------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\USER\Desktop\PapageorgiouSaamSchulte2015\estimation_results.log
  log type:  text
 opened on:  19 Oct 2015, 14:56:29

. 
. 
. 
. 
. 
. *******************************************************************************************
. *                                                                                         *
. *   Table 3 - Nonlinear Estimation and Kmenta Approximation of CES - Electricity Sector   *     
. *                                                                                         *
. *******************************************************************************************
. 
. qui{

. 
. 
. 
. 
. ***
. * Column 1: Nonlinear Estimation of CES in Levels - Electricity Sector
. ***
. 
. macro drop _*

. 
. * Estimation
. #delimit ;
delimiter now ;
. nl ( ln_eg = {a} + {d}*year +
> ${COUNTRY}    
> +(1/{psi}*ln({omega}*EC_c^({psi})+(1-{omega})*EC_d^({psi}))) ) , 
> initial( a 20 d 0.01 psi -0.5 omega 0.5) vce(cluster country) iterate(100);
(obs = 390)

Iteration 0:  residual SS =   2.34065
Iteration 1:  residual SS =  2.151464
Iteration 2:  residual SS =  2.150013
Iteration 3:  residual SS =  2.149991
Iteration 4:  residual SS =   2.14999
Iteration 5:  residual SS =   2.14999
Iteration 6:  residual SS =   2.14999
Iteration 7:  residual SS =   2.14999
Iteration 8:  residual SS =   2.14999
Iteration 9:  residual SS =   2.14999

Nonlinear regression                                 Number of obs =       390
                                                     R-squared     =    0.9976
                                                     Adj R-squared =    0.9975
                                                     Root MSE      =  .0745354
                                                     Res. dev.     = -921.4945

                               (Std. Err. adjusted for 26 clusters in country)
------------------------------------------------------------------------------
             |               Robust
       ln_eg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /a |   4.465565   3.893727     1.15   0.262    -3.553715    12.48485
          /d |  -.0012624   .0019474    -0.65   0.523    -.0052732    .0027484
       /b_c1 |  -.0351117   .0166542    -2.11   0.045    -.0694116   -.0008118
       /b_c2 |   .1366132   .1245718     1.10   0.283    -.1199472    .3931737
       /b_c3 |   .3370556   .0754942     4.46   0.000     .1815723    .4925388
       /b_c4 |   .6389254   .1360444     4.70   0.000     .3587366    .9191141
       /b_c5 |    .031203   .0226976     1.37   0.181    -.0155436    .0779497
       /b_c6 |   .1115976    .041545     2.69   0.013     .0260342    .1971611
       /b_c7 |  -.3421328   .0260989   -13.11   0.000    -.3958845   -.2883811
       /b_c8 |    .034764   .0834369     0.42   0.680    -.1370775    .2066055
       /b_c9 |   .0941234    .040592     2.32   0.029     .0105226    .1777241
      /b_c10 |   .7206287   .1526636     4.72   0.000     .4062121    1.035045
      /b_c11 |   .0540503   .0054983     9.83   0.000     .0427263    .0653743
      /b_c12 |   .0284739   .0199637     1.43   0.166     -.012642    .0695898
      /b_c13 |   -.057773   .0001549  -372.88   0.000    -.0580921   -.0574539
      /b_c14 |  -.0475126   .0397337    -1.20   0.243    -.1293457    .0343205
      /b_c15 |  -.2183183    .017635   -12.38   0.000    -.2546383   -.1819983
      /b_c16 |  -.0299143   .0442262    -0.68   0.505        -.121    .0611713
      /b_c17 |   .2396631   .0310051     7.73   0.000     .1758069    .3035193
      /b_c18 |  -.1486561   .1527613    -0.97   0.340     -.463274    .1659618
      /b_c19 |    .033417   .0140733     2.37   0.026     .0044324    .0624016
      /b_c20 |  -.0578774   .1071921    -0.54   0.594    -.2786436    .1628888
      /b_c21 |  -.0403106   .0730256    -0.55   0.586    -.1907097    .1100885
      /b_c22 |   .1164693   .1137032     1.02   0.315    -.1177068    .3506454
      /b_c23 |   .3922731   .1006065     3.90   0.001     .1850702    .5994761
      /b_c24 |   .6812015   .1540663     4.42   0.000      .363896    .9985071
      /b_c25 |   .0797274   .0527106     1.51   0.143     -.028832    .1882868
        /psi |   .4565922   .1931282     2.36   0.026     .0588373    .8543471
      /omega |   .2194588   .0678929     3.23   0.003     .0796307     .359287
------------------------------------------------------------------------------
  Parameter a taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. local a = _b[/a]

. local d = _b[/d]

. local psi = _b[/psi]

. local omega = _b[/omega]

. 
. * Bootstrapping
. #delimit ;
delimiter now ;
. nl ( ln_eg = {a} + {d}*year +
> ${COUNTRY2}    
> +(1/{psi}*ln({omega}*EC_c^({psi})+(1-{omega})*EC_d^({psi}))) ) , 
> initial( a `a' d `d' psi `psi' omega `omega') vce(bootstrap, cluster(country) idcluster(newid) reps(400) reject(_b[/psi] > 1 | _se[/psi] == 0) seed(123)) iterat
> e(100);
(running nl on estimation sample)

Bootstrap replications (400)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
........xxx.xx....x....xx.x.x...x...x...x....x....    50
.x.......x...xxx.xx...x.x..x.....x.xxxx.xx...xxx..   100
xx.xxx.x.x.x...x.x..x.xxx.x.xx....x.xxxx..x.....x.   150
.x......x...xx.......xx..x.xxx..x.....x........xx.   200
x.xx..x..x.........xx.x.x....xx..xxx....x.xx......   250
xx...........xxxx...xx....x.x........xx....x...xx.   300
x.xx.x..x..xx.xx.x..xx.xxx.xx.x...xx.x...xx..x..xx   350
....x..x..x......xx.x..x..x.x.........x.x.x..x.x.x   400

Nonlinear regression                                 Number of obs =       390
                                                     R-squared     =    0.9976
                                                     Adj R-squared =    0.9974
                                                     Root MSE      =  .0771729
                                                     Res. dev.     = -921.4945

Bootstrap results
                                (Replications based on 26 clusters in country)
------------------------------------------------------------------------------
             |   Observed   Bootstrap                         Normal-based
       ln_eg |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /a |   4.465565    3.75119     1.19   0.234    -2.886632    11.81776
          /d |  -.0012624   .0018944    -0.67   0.505    -.0049753    .0024505
       /b_c1 |  -.0351117   .2528399    -0.14   0.890    -.5306689    .4604455
       /b_c2 |   .1366133   .2683465     0.51   0.611    -.3893362    .6625628
       /b_c3 |   .3370556   .2734992     1.23   0.218    -.1989929    .8731041
       /b_c4 |   .6389254   .3216173     1.99   0.047     .0085671    1.269284
       /b_c5 |   .0312031   .3370491     0.09   0.926     -.629401    .6918071
       /b_c6 |   .1115977   .3281555     0.34   0.734    -.5315752    .7547706
       /b_c7 |  -.3421328   .3355021    -1.02   0.308     -.999705    .3154393
       /b_c8 |   .0347641   .3487385     0.10   0.921    -.6487508    .7182789
       /b_c9 |   .0941234   .3505946     0.27   0.788    -.5930294    .7812762
      /b_c10 |   .7206288   .3399483     2.12   0.034     .0543424    1.386915
      /b_c11 |   .0540503   .3350952     0.16   0.872    -.6027242    .7108248
      /b_c12 |   .0284739   .2822623     0.10   0.920      -.52475    .5816979
      /b_c13 |   -.057773   .2867484    -0.20   0.840    -.6197895    .5042435
      /b_c14 |  -.0475126   .2661311    -0.18   0.858    -.5691201    .4740948
      /b_c15 |  -.2183183   .2535623    -0.86   0.389    -.7152913    .2786547
      /b_c16 |  -.0299143   .2541482    -0.12   0.906    -.5280356     .468207
      /b_c17 |   .2396631   .2382904     1.01   0.315    -.2273774    .7067037
      /b_c18 |   -.148656   .2381681    -0.62   0.533    -.6154569    .3181448
      /b_c19 |    .033417      .2508     0.13   0.894     -.458142    .5249761
      /b_c20 |  -.0578775   .2571006    -0.23   0.822    -.5617855    .4460305
      /b_c21 |  -.0403105   .2922379    -0.14   0.890    -.6130863    .5324652
      /b_c22 |   .1164693   .3471297     0.34   0.737    -.5638923     .796831
      /b_c23 |   .3922732   .3522325     1.11   0.265    -.2980899    1.082636
      /b_c24 |   .6812016   .3330241     2.05   0.041     .0284864    1.333917
      /b_c25 |   .0797274   .2805206     0.28   0.776    -.4700828    .6295377
        /psi |   .4565924   .2184467     2.09   0.037     .0284448      .88474
      /omega |   .2194588   .0899261     2.44   0.015     .0432068    .3957108
------------------------------------------------------------------------------
  Parameter a taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. * Testing both against the psi corresponding to sigma = 1 and sigma = infinity
. test _b[/psi] = 0

 ( 1)  [psi]_cons = 0

           chi2(  1) =    4.37
         Prob > chi2 =    0.0366

. test _b[/psi] = 1

 ( 1)  [psi]_cons = 1

           chi2(  1) =    6.19
         Prob > chi2 =    0.0129

. 
. * Computing sigma
. dis 1 / (1-_b[/psi])
1.8402393

. 
. * Testing nonlinearly for psi and sigma
. testnl _b[/psi] = 0

  (1)  _b[/psi] = 0

               chi2(1) =        4.37
           Prob > chi2 =        0.0366

. testnl 1/(1-_b[/psi]) = 1

  (1)  1/(1-_b[/psi]) = 1

               chi2(1) =        1.29
           Prob > chi2 =        0.2560

. 
. 
. 
. 
. 
. ***
. * Column 2: Nonlinear Estimation of CES in First Differences - Electricity Sector
. ***
. 
. macro drop _*

. 
. xtset id year
       panel variable:  id (strongly balanced)
        time variable:  year, 1995 to 2009
                delta:  1 unit

. 
. * Generate variables in first differences
. gen d1ln_eg = D.ln_eg
(26 missing values generated)

. gen l1EC_c = L.EC_c
(26 missing values generated)

. gen l1EC_d = L.EC_d
(26 missing values generated)

. gen l1FU_d = L.FU_d
(26 missing values generated)

. 
. xtset id
       panel variable:  id (balanced)

. 
. * Estimation
. #delimit ;
delimiter now ;
. nl ( d1ln_eg = {d}
> +(1/({psi})*ln( ( {omega}*EC_c^({psi})+(1-{omega})*EC_d^({psi})) / ( {omega}*l1EC_c^({psi})+ (1-{omega})*l1EC_d^({psi})) ) ) ) if year >= 1996, 
> initial( d 0.01 psi -0.5 omega 0.5) vce(cluster country);
(obs = 364)

Iteration 0:  residual SS =  1.571176
Iteration 1:  residual SS =  1.549369
Iteration 2:  residual SS =  1.548593
Iteration 3:  residual SS =  1.548592
Iteration 4:  residual SS =  1.548592
Iteration 5:  residual SS =  1.548592

Nonlinear regression                                 Number of obs =       364
                                                     R-squared     =    0.1918
                                                     Adj R-squared =    0.1595
                                                     Root MSE      =   .065496
                                                     Res. dev.     = -954.3827

                               (Std. Err. adjusted for 26 clusters in country)
------------------------------------------------------------------------------
             |               Robust
     d1ln_eg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /d |  -.0031852   .0025011    -1.27   0.215    -.0083364     .001966
        /psi |    .486554   .0751194     6.48   0.000     .3318427    .6412654
      /omega |   .4417725   .0779464     5.67   0.000     .2812389    .6023061
------------------------------------------------------------------------------
  Parameter d taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. local d = _b[/d]

. local psi = _b[/psi]

. local omega = _b[/omega]

. 
. * Bootstrapping
. #delimit ;
delimiter now ;
. nl ( d1ln_eg = {d}
> +(1/({psi})*ln( ( {omega}*EC_c^({psi})+(1-{omega})*EC_d^({psi})) / ( {omega}*l1EC_c^({psi})+ (1-{omega})*l1EC_d^({psi})) ) ) ) if year >= 1996, 
> initial( d `d' psi `psi' omega `omega') vce(bootstrap, cluster(country) reps(400) reject(_b[/psi] > 1 | _se[/psi] == 0) seed(123));
(running nl on estimation sample)

Bootstrap replications (400)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
........xxx.xx....x....xx.x.x.......xx..x....x....    50
.x...........xxx.xx.....x..x.....x.xxxx.x....xxxx.   100
xx.x.x.xxx.x...x.x..x.xxx.x.xx....x.xxxx..x.....x.   150
.x..........xx.x.....xx....xxx.xx.....x...x...xxx.   200
xxxx.....x.........xx.x.x....xx..xxx....x.xx.x....   250
xx...........xxxx.x.xx..x.x.x..x.....xx....xxx.xxx   300
x.xx.x..xx.xxxxx....xx.x..xxx.x...xx...xxxx.xx..xx   350
....x..x..xx.....xx.x..x..x.x.........x.x.x..x..xx   400

Nonlinear regression                                 Number of obs =       364
                                                     R-squared     =    0.1918
                                                     Adj R-squared =    0.1874
                                                     Root MSE      =   .065496
                                                     Res. dev.     = -954.3827

Bootstrap results
                                (Replications based on 26 clusters in country)
------------------------------------------------------------------------------
             |   Observed   Bootstrap                         Normal-based
     d1ln_eg |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /d |  -.0031852   .0020279    -1.57   0.116    -.0071599    .0007895
        /psi |   .4865543     .13314     3.65   0.000     .2256047    .7475038
      /omega |   .4417725   .0761295     5.80   0.000     .2925614    .5909836
------------------------------------------------------------------------------
  Parameter d taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. 
. * Testing both against the psi corresponding to sigma = 1 and sigma = infinity
. test _b[/psi] = 0

 ( 1)  [psi]_cons = 0

           chi2(  1) =   13.36
         Prob > chi2 =    0.0003

. test _b[/psi] = 1

 ( 1)  [psi]_cons = 1

           chi2(  1) =   14.87
         Prob > chi2 =    0.0001

. 
. * Computing sigma
. dis 1 / (1-_b[/psi])
1.9476255

. 
. * Testing nonlinearly for psi and sigma
. testnl _b[/psi] = 0

  (1)  _b[/psi] = 0

               chi2(1) =       13.36
           Prob > chi2 =        0.0003

. testnl 1/(1-_b[/psi]) = 1

  (1)  1/(1-_b[/psi]) = 1

               chi2(1) =        3.52
           Prob > chi2 =        0.0606

. 
. 
. 
. 
. 
. 
. ***
. * Column 3: Linear Estimation of Kmenta Approximation in Levels - Electricity Sector
. ***
. 
. macro drop _*

. 
. * OLS
. reg ln_egecd c1-c25 year ln_eccd ln_eccd_2, vce(cluster country)

Linear regression                                      Number of obs =     390
                                                       F(  2,    25) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.9703
                                                       Root MSE      =  .07675

                               (Std. Err. adjusted for 26 clusters in country)
------------------------------------------------------------------------------
             |               Robust
    ln_egecd |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          c1 |  -.0341171   .0124966    -2.73   0.011    -.0598542   -.0083799
          c2 |   .0983253   .0782317     1.26   0.220    -.0627959    .2594465
          c3 |    .318805   .0492128     6.48   0.000     .2174493    .4201607
          c4 |   .5954962   .0854289     6.97   0.000     .4195521    .7714402
          c5 |   .0274232    .015686     1.75   0.093    -.0048829    .0597292
          c6 |   .1035476   .0281029     3.68   0.001     .0456686    .1614266
          c7 |  -.3467906   .0229441   -15.11   0.000    -.3940448   -.2995364
          c8 |   .0135492   .0539035     0.25   0.804    -.0974671    .1245654
          c9 |   .0868064    .027752     3.13   0.004     .0296502    .1439627
         c10 |   .6697991   .0970784     6.90   0.000     .4698625    .8697358
         c11 |    .054562   .0040236    13.56   0.000     .0462753    .0628487
         c12 |   .0257611    .014134     1.82   0.080    -.0033484    .0548706
         c13 |  -.0576824   .0000785  -734.97   0.000    -.0578441   -.0575208
         c14 |  -.0490237    .031957    -1.53   0.138    -.1148403    .0167928
         c15 |  -.2206398   .0125268   -17.61   0.000    -.2464392   -.1948404
         c16 |  -.0382044   .0300653    -1.27   0.216     -.100125    .0237163
         c17 |   .2346388   .0215045    10.91   0.000     .1903493    .2789282
         c18 |  -.1960927   .1071883    -1.83   0.079    -.4168511    .0246657
         c19 |   .0314248   .0099188     3.17   0.004     .0109967    .0518529
         c20 |  -.0935276   .1028737    -0.91   0.372       -.3054    .1183447
         c21 |  -.0577492   .0477112    -1.21   0.237    -.1560122    .0405138
         c22 |   .0828864   .0717192     1.16   0.259     -.064822    .2305949
         c23 |   .3642863   .0639844     5.69   0.000     .2325079    .4960646
         c24 |   .6297745   .0982048     6.41   0.000     .4275179    .8320312
         c25 |   .0686497   .0352029     1.95   0.062    -.0038521    .1411516
        year |  -.0009783   .0019594    -0.50   0.622    -.0050138    .0030571
     ln_eccd |   .2453325    .040721     6.02   0.000     .1614659    .3291991
   ln_eccd_2 |     .08264   .0186111     4.44   0.000     .0443097    .1209704
       _cons |   3.918711   3.920895     1.00   0.327    -4.156523    11.99395
------------------------------------------------------------------------------

. 
. *               (d: _b[t]) ///
> 
. nlcom   (a: _b[_cons]) ///
>                 (d: _b[year]) ///
>                 (omega: _b[ln_eccd]) ///
>                 (psi:  ((_b[ln_eccd]*(1-_b[ln_eccd])/(_b[ln_eccd]*(1-_b[ln_eccd])-_b[ln_eccd_2])) - 1) / (_b[ln_eccd]*(1-_b[ln_eccd])/(_b[ln_eccd]*(1-_b[ln_eccd
> ])-_b[ln_eccd_2]))) ///
>                 

           a:  _b[_cons]
           d:  _b[year]
       omega:  _b[ln_eccd]
         psi:  ((_b[ln_eccd]*(1-_b[ln_eccd])/(_b[ln_eccd]*(1-_b[ln_eccd])-_b[ln_eccd_2])) - 1) / (_b[ln_eccd]*(1-_b[ln_eccd])/(_b[ln_eccd]*(1-_b[ln_eccd])-_b[ln_e
> ccd_2]))

------------------------------------------------------------------------------
    ln_egecd |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           a |   3.918711   3.920895     1.00   0.327    -4.156523    11.99395
           d |  -.0009783   .0019594    -0.50   0.622    -.0050138    .0030571
       omega |   .2453325    .040721     6.02   0.000     .1614659    .3291991
         psi |   .4463543   .1314961     3.39   0.002      .175533    .7171756
------------------------------------------------------------------------------

. testnl  (((_b[ln_eccd]*(1-_b[ln_eccd])/(_b[ln_eccd]*(1-_b[ln_eccd])-_b[ln_eccd_2])) - 1) / (_b[ln_eccd]*(1-_b[ln_eccd])/(_b[ln_eccd]*(1-_b[ln_eccd])-_b[ln_eccd_
> 2])) = 0)

  (1)  ((_b[ln_eccd]*(1-_b[ln_eccd])/(_b[ln_eccd]*(1-_b[ln_eccd])-_b[ln_eccd_2])) - 1) / (_b[ln_eccd]*(1-_b[ln_eccd])/(_b[ln_eccd]*(1-_b[ln_eccd])-_b[ln_eccd_2]))
>  = 0

              F(1, 25) =       11.52
              Prob > F =        0.0023

. dis "sigma: " _b[ln_eccd]*(1-_b[ln_eccd])/(_b[ln_eccd]*(1-_b[ln_eccd])-_b[ln_eccd_2]) 
sigma: 1.8062094

. dis e(r2_a)
.9679572

. 
. 
. 
. 
. 
. 
. ***
. * Column 4: Linear Estimation of Kmenta Approximation in First Differences - Electricity Sector
. ***
. 
. macro drop _*

. 
. xtset id year
       panel variable:  id (strongly balanced)
        time variable:  year, 1995 to 2009
                delta:  1 unit

. gen dln_egecd = D.ln_egecd
(26 missing values generated)

. gen dln_eccd = D.ln_eccd 
(26 missing values generated)

. gen dln_eccd_2 = D.ln_eccd_2
(26 missing values generated)

. 
. * FD-OLS
. reg dln_egecd dln_eccd dln_eccd_2, vce(cluster country)

Linear regression                                      Number of obs =     364
                                                       F(  2,    25) =  274.74
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.5486
                                                       Root MSE      =  .06547

                               (Std. Err. adjusted for 26 clusters in country)
------------------------------------------------------------------------------
             |               Robust
   dln_egecd |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    dln_eccd |   .4510513   .0573146     7.87   0.000     .3330096     .569093
  dln_eccd_2 |   .1125249   .0095794    11.75   0.000     .0927957    .1322541
       _cons |  -.0030952   .0026301    -1.18   0.250    -.0085121    .0023216
------------------------------------------------------------------------------

. 
. nlcom   (d: _b[_cons]) ///
>                 (omega: _b[dln_eccd]) ///
>                 (psi:  ((_b[dln_eccd]*(1-_b[dln_eccd])/(_b[dln_eccd]*(1-_b[dln_eccd])-_b[dln_eccd_2])) - 1) / (_b[dln_eccd]*(1-_b[dln_eccd])/(_b[dln_eccd]*(1-_b
> [dln_eccd])-_b[dln_eccd_2])))

           d:  _b[_cons]
       omega:  _b[dln_eccd]
         psi:  ((_b[dln_eccd]*(1-_b[dln_eccd])/(_b[dln_eccd]*(1-_b[dln_eccd])-_b[dln_eccd_2])) - 1) / (_b[dln_eccd]*(1-_b[dln_eccd])/(_b[dln_eccd]*(1-_b[dln_eccd]
> )-_b[dln_eccd_2]))

------------------------------------------------------------------------------
   dln_egecd |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           d |  -.0030952   .0026301    -1.18   0.250    -.0085121    .0023216
       omega |   .4510513   .0573146     7.87   0.000     .3330096     .569093
         psi |   .4544551   .0460256     9.87   0.000     .3596636    .5492467
------------------------------------------------------------------------------

. 
. testnl  (((_b[dln_eccd]*(1-_b[dln_eccd])/(_b[dln_eccd]*(1-_b[dln_eccd])-_b[dln_eccd_2])) - 1) / (_b[dln_eccd]*(1-_b[dln_eccd])/(_b[dln_eccd]*(1-_b[dln_eccd])-_b
> [dln_eccd_2])) = 0)

  (1)  ((_b[dln_eccd]*(1-_b[dln_eccd])/(_b[dln_eccd]*(1-_b[dln_eccd])-_b[dln_eccd_2])) - 1) / (_b[dln_eccd]*(1-_b[dln_eccd])/(_b[dln_eccd]*(1-_b[dln_eccd])-_b[dln
> _eccd_2])) = 0

              F(1, 25) =       97.50
              Prob > F =        0.0000

. dis "sigma: " _b[dln_eccd]*(1-_b[dln_eccd])/(_b[dln_eccd]*(1-_b[dln_eccd])-_b[dln_eccd_2]) 
sigma: 1.8330298

. dis e(r2_a)
.54610709

. 
. 
. 
. 
. 
. 
. 
. 
. *****************************************************************************************************************************
. *                                                                                                                           *
. *   Table 4 - Nonlinear Estimation and Kmenta Approximation of CES with an Alternative Capital Proxy - Electricity Sector   *   
. *                                                                                                                           *
. *****************************************************************************************************************************
. 
. qui{

. 
. 
. ***
. * Column 1: Nonlinear Estimation of CES in Levels - Electricity Sector - Alternative Capital Proxy
. *** 
. 
. macro drop _*

. 
. * Estimation
. #delimit ;
delimiter now ;
. nl ( ln_eg = {a} + {d}*year +
> ${COUNTRY}    
> +(1/{psi}*ln({omega}*EC_c_alt^({psi})+(1-{omega})*EC_d_alt^({psi}))) ) , 
> initial( a 20 d 0.01 psi -0.5 omega 0.5) vce(cluster country) iterate(100);
(obs = 338)

Iteration 0:  residual SS =  2.376213
Iteration 1:  residual SS =    2.0709
Iteration 2:  residual SS =  2.070028
Iteration 3:  residual SS =  2.069967
Iteration 4:  residual SS =  2.069962
Iteration 5:  residual SS =  2.069961
Iteration 6:  residual SS =  2.069961
Iteration 7:  residual SS =  2.069961
Iteration 8:  residual SS =  2.069961
Iteration 9:  residual SS =  2.069961
Iteration 10:  residual SS =  2.069961
Iteration 11:  residual SS =  2.069961
Iteration 12:  residual SS =  2.069961
Iteration 13:  residual SS =  2.069961
Iteration 14:  residual SS =  2.069961

Nonlinear regression                                 Number of obs =       338
                                                     R-squared     =    0.9973
                                                     Adj R-squared =    0.9972
                                                     Root MSE      =  .0786065
                                                     Res. dev.     =  -763.082

                               (Std. Err. adjusted for 26 clusters in country)
------------------------------------------------------------------------------
             |               Robust
       ln_eg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /a |   7.742011   4.950649     1.56   0.130    -2.454041    17.93806
          /d |  -.0096849   .0024799    -3.91   0.001    -.0147924   -.0045775
       /b_c1 |  -.0214531   .0328862    -0.65   0.520    -.0891834    .0462773
       /b_c2 |    .118188   .1286541     0.92   0.367      -.14678     .383156
       /b_c3 |   .2781846   .0912623     3.05   0.005     .0902263    .4661428
       /b_c4 |   .6031824   .1438388     4.19   0.000     .3069409     .899424
       /b_c5 |   .0044341   .0234372     0.19   0.851    -.0438357    .0527039
       /b_c6 |   .0904506   .0420893     2.15   0.042     .0037659    .1771352
       /b_c7 |  -.2609094   .0758981    -3.44   0.002    -.4172245   -.1045944
       /b_c8 |   .0350897   .0866725     0.40   0.689    -.1434157     .213595
       /b_c9 |   .0682845   .0450231     1.52   0.142    -.0244422    .1610113
      /b_c10 |   .6075631   .1676306     3.62   0.001     .2623215    .9528047
      /b_c11 |   .0482597   .0023132    20.86   0.000     .0434956    .0530239
      /b_c12 |   .0476217   .0085129     5.59   0.000     .0300892    .0651543
      /b_c13 |  -.0914389   .0094329    -9.69   0.000    -.1108663   -.0720115
      /b_c14 |  -.0002246   .0715955    -0.00   0.998    -.1476783    .1472292
      /b_c15 |  -.1891694   .0084658   -22.35   0.000    -.2066051   -.1717337
      /b_c16 |  -.0516848   .0515074    -1.00   0.325    -.1577662    .0543967
      /b_c17 |   .1962596   .0433544     4.53   0.000     .1069697    .2855496
      /b_c18 |   -.191597   .1626433    -1.18   0.250    -.5265672    .1433732
      /b_c19 |   .0373443   .0103949     3.59   0.001     .0159357    .0587529
      /b_c20 |  -.0156514   .1495566    -0.10   0.917    -.3236689    .2923662
      /b_c21 |  -.0185426   .0679734    -0.27   0.787    -.1585364    .1214511
      /b_c22 |   .0473515   .1254151     0.38   0.709    -.2109457    .3056487
      /b_c23 |   .3308465   .1106196     2.99   0.006     .1030211    .5586719
      /b_c24 |   .6205265    .165925     3.74   0.001     .2787977    .9622554
      /b_c25 |   .0769382   .0500809     1.54   0.137    -.0262053    .1800817
        /psi |   .4233153   .2061038     2.05   0.051    -.0011634    .8477939
      /omega |   .1933397   .0850582     2.27   0.032      .018159    .3685204
------------------------------------------------------------------------------
  Parameter a taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. local a = _b[/a]

. local d = _b[/d]

. local psi = _b[/psi]

. local omega = _b[/omega]

. 
. * Bootstrapping
. #delimit ;
delimiter now ;
. nl ( ln_eg = {a} + {d}*year +
> ${COUNTRY2}    
> +(1/{psi}*ln({omega}*EC_c_alt^({psi})+(1-{omega})*EC_d_alt^({psi}))) ) , 
> initial(a `a' d `d' psi `psi' omega `omega') vce(bootstrap, cluster(country) idcluster(newid) reps(400) reject(_b[/psi] > 1 | _se[/psi] == 0)  seed(123)) iterat
> e(100);
(running nl on estimation sample)

Bootstrap replications (400)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
........xxx..x....x....x..x.x...x...x...x...xx....    50
.x...........xxx.xx.....x..x.....x.xxxx.x....xxx..   100
xx.x...xxx.x...x.x..x.xxx.x.xx....x..xxx..x.....x.   150
.x......x...xx.......xx..x.xxx..x.....x........xx.   200
x.xx...............xx.x.x....xx...xx....x.x..x....   250
xx...........xxxx...xx....x.x........xx....xx...x.   300
x.xx.x..xx.xx.xx.x..xx.x.x.xx.x...xx...x.xx..x..xx   350
....x..x..x......x..x..x..x.x.........x.x.x..x.x.x   400

Nonlinear regression                                 Number of obs =       338
                                                     R-squared     =    0.9973
                                                     Adj R-squared =    0.9971
                                                     Root MSE      =  .0818468
                                                     Res. dev.     =  -763.082

Bootstrap results
                                (Replications based on 26 clusters in country)
------------------------------------------------------------------------------
             |   Observed   Bootstrap                         Normal-based
       ln_eg |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /a |   7.742011   5.256168     1.47   0.141    -2.559888    18.04391
          /d |  -.0096849   .0026376    -3.67   0.000    -.0148546   -.0045152
       /b_c1 |  -.0214531   .2360543    -0.09   0.928     -.484111    .4412048
       /b_c2 |    .118188   .2589834     0.46   0.648    -.3894102    .6257861
       /b_c3 |   .2781846   .2603513     1.07   0.285    -.2320945    .7884637
       /b_c4 |   .6031824   .3009994     2.00   0.045     .0132345     1.19313
       /b_c5 |   .0044341   .3094986     0.01   0.989    -.6021721    .6110403
       /b_c6 |   .0904506   .2938346     0.31   0.758    -.4854546    .6663557
       /b_c7 |  -.2609094   .3024496    -0.86   0.388    -.8536997    .3318809
       /b_c8 |   .0350897   .3095831     0.11   0.910     -.571682    .6418613
       /b_c9 |   .0682845   .3062534     0.22   0.824    -.5319612    .6685302
      /b_c10 |   .6075631   .3043383     2.00   0.046      .011071    1.204055
      /b_c11 |   .0482597   .3021717     0.16   0.873    -.5439859    .6405054
      /b_c12 |   .0476217   .2623819     0.18   0.856    -.4666374    .5618809
      /b_c13 |  -.0914389   .2636568    -0.35   0.729    -.6081968     .425319
      /b_c14 |  -.0002246    .241927    -0.00   0.999    -.4743929    .4739437
      /b_c15 |  -.1891694   .2416425    -0.78   0.434      -.66278    .2844412
      /b_c16 |  -.0516847   .2421926    -0.21   0.831    -.5263736    .4230041
      /b_c17 |   .1962596   .2372706     0.83   0.408    -.2687821    .6613014
      /b_c18 |   -.191597   .2426152    -0.79   0.430    -.6671141      .28392
      /b_c19 |   .0373443   .2501939     0.15   0.881    -.4530268    .5277154
      /b_c20 |  -.0156514   .2421913    -0.06   0.948    -.4903376    .4590348
      /b_c21 |  -.0185426   .2726753    -0.07   0.946    -.5529764    .5158912
      /b_c22 |   .0473515   .3192577     0.15   0.882    -.5783821    .6730851
      /b_c23 |   .3308465   .3335408     0.99   0.321    -.3228814    .9845745
      /b_c24 |   .6205265   .3184538     1.95   0.051    -.0036315    1.244685
      /b_c25 |   .0769382   .2689335     0.29   0.775    -.4501618    .6040382
        /psi |   .4233153   .2496042     1.70   0.090    -.0658999    .9125304
      /omega |   .1933397   .1153401     1.68   0.094    -.0327228    .4194022
------------------------------------------------------------------------------
  Parameter a taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. * Testing both against the psi corresponding to sigma = 1 and sigma = infinity
. test _b[/psi] = 0

 ( 1)  [psi]_cons = 0

           chi2(  1) =    2.88
         Prob > chi2 =    0.0899

. test _b[/psi] = 1

 ( 1)  [psi]_cons = 1

           chi2(  1) =    5.34
         Prob > chi2 =    0.0209

. 
. * Computing sigma
. dis 1 / (1-_b[/psi])
1.7340498

. 
. * Testing nonlinearly for psi and sigma
. testnl _b[/psi] = 0

  (1)  _b[/psi] = 0

               chi2(1) =        2.88
           Prob > chi2 =        0.0899

. testnl 1/(1-_b[/psi]) = 1

  (1)  1/(1-_b[/psi]) = 1

               chi2(1) =        0.96
           Prob > chi2 =        0.3281

. 
. 
. 
. 
. 
. ***
. * Column 2: Nonlinear Estimation of CES in First Differences - Electricity Sector - Alternative Capital Proxy
. *** 
. 
. macro drop _*

. 
. * Estimation
. #delimit ;
delimiter now ;
. nl ( d1ln_eg = {d}
> +(1/({psi})*ln( ( {omega}*EC_c_alt^({psi})+(1-{omega})*EC_d_alt^({psi})) / ( {omega}*l1EC_c_alt^({psi})+ (1-{omega})*l1EC_d_alt^({psi})) ) ) ) if year >= 1996, 
> initial( d 0.01 psi -0.5 omega 0.5) vce(cluster country);
(obs = 312)

Iteration 0:  residual SS =  1.668837
Iteration 1:  residual SS =  1.607392
Iteration 2:  residual SS =  1.602607
Iteration 3:  residual SS =  1.602607
Iteration 4:  residual SS =  1.602607
Iteration 5:  residual SS =  1.602607

Nonlinear regression                                 Number of obs =       312
                                                     R-squared     =    0.0595
                                                     Adj R-squared =    0.0219
                                                     Root MSE      =  .0720169
                                                     Res. dev.     = -759.2503

                               (Std. Err. adjusted for 26 clusters in country)
------------------------------------------------------------------------------
             |               Robust
     d1ln_eg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /d |  -.0091354   .0025795    -3.54   0.002     -.014448   -.0038227
        /psi |   .4599187   .1087235     4.23   0.000     .2359983     .683839
      /omega |   .3881194   .0842793     4.61   0.000     .2145428    .5616959
------------------------------------------------------------------------------
  Parameter d taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. local d = _b[/d]

. local psi = _b[/psi]

. local omega = _b[/omega]

. 
. * Bootstrapping
. #delimit ;
delimiter now ;
. nl ( d1ln_eg = {d}
> +(1/({psi})*ln( ( {omega}*EC_c_alt^({psi})+(1-{omega})*EC_d_alt^({psi})) / ( {omega}*l1EC_c_alt^({psi})+ (1-{omega})*l1EC_d_alt^({psi})) ) ) ) if year >= 1996, 
> initial( d `d' psi `psi' omega `omega') vce(bootstrap, cluster(country) reps(400) reject(_b[/psi] > 1 | _se[/psi] == 0)  seed(123));
(running nl on estimation sample)

Bootstrap replications (400)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
........xxx..x....x....x..x.x.......xx..x....x....    50
.x...........xxx.xx.....x..x.....x.xxxx.x....x.x..   100
xx.x.x.xx..x........x..xx.x.xx....x..xx...x.......   150
.x..........xx.x.....xx....x...xx.....x.......xxx.   200
.xxx...............xx.x......xx..xxx....x......x..   250
xx.............xx...xx....x.x..x......x....xxx.x..   300
x.xx.x.....xxxx.....xx.x....x.x....x...xxxx..x..xx   350
.......x...x.....x.....x..x.x.........x.x....x...x   400

Nonlinear regression                                 Number of obs =       312
                                                     R-squared     =    0.0595
                                                     Adj R-squared =    0.0534
                                                     Root MSE      =  .0720169
                                                     Res. dev.     = -759.2503

Bootstrap results
                                (Replications based on 26 clusters in country)
------------------------------------------------------------------------------
             |   Observed   Bootstrap                         Normal-based
     d1ln_eg |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /d |  -.0091354   .0023284    -3.92   0.000    -.0136989   -.0045718
        /psi |   .4599187   .1772985     2.59   0.009       .11242    .8074173
      /omega |   .3881194   .1088482     3.57   0.000     .1747808     .601458
------------------------------------------------------------------------------
  Parameter d taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. 
. * Testing both against the psi corresponding to sigma = 1 and sigma = infinity
. test _b[/psi] = 0

 ( 1)  [psi]_cons = 0

           chi2(  1) =    6.73
         Prob > chi2 =    0.0095

. test _b[/psi] = 1

 ( 1)  [psi]_cons = 1

           chi2(  1) =    9.28
         Prob > chi2 =    0.0023

. 
. * Computing sigma
. dis 1 / (1-_b[/psi])
1.851573

. 
. * Testing nonlinearly for psi and sigma
. testnl _b[/psi] = 0

  (1)  _b[/psi] = 0

               chi2(1) =        6.73
           Prob > chi2 =        0.0095

. testnl 1/(1-_b[/psi]) = 1

  (1)  1/(1-_b[/psi]) = 1

               chi2(1) =        1.96
           Prob > chi2 =        0.1612

. 
. 
. 
. 
. 
. ***
. * Column 3: Linear Estimation of Kmenta Approximation in Levels - Electricity Sector - Alternative Capital Proxy
. *** 
. 
. macro drop _*

. 
. * Generate additional variables 
. drop ln_egecd ln_eccd ln_eccd_2

. gen ln_ecc_ecd_alt = ln_ecc_alt * ln_ecd_alt

. gen ln_egecd_alt = ln_eg - ln_ecd_alt

. gen ln_eccd_alt = ln_ecc_alt-ln_ecd_alt

. gen ln_eccd_2_alt = 0.5*(ln_ecc_alt-ln_ecd_alt)^2

. 
. * OLS
. reg ln_egecd_alt c1-c25 year ln_eccd_alt ln_eccd_2_alt, vce(cluster country)

Linear regression                                      Number of obs =     338
                                                       F(  2,    25) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.9680
                                                       Root MSE      =  .08091

                                (Std. Err. adjusted for 26 clusters in country)
-------------------------------------------------------------------------------
              |               Robust
 ln_egecd_alt |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
           c1 |  -.0230962   .0213441    -1.08   0.290    -.0670552    .0208629
           c2 |   .0940173   .0765362     1.23   0.231     -.063612    .2516465
           c3 |   .2654131   .0538896     4.93   0.000     .1544254    .3764007
           c4 |   .5734554   .0869053     6.60   0.000     .3944705    .7524402
           c5 |   .0032521   .0143276     0.23   0.822    -.0262561    .0327603
           c6 |   .0874255   .0254475     3.44   0.002     .0350154    .1398355
           c7 |   -.279344   .0555773    -5.03   0.000    -.3938077   -.1648803
           c8 |   .0233717   .0512405     0.46   0.652    -.0821601    .1289036
           c9 |   .0650361   .0272065     2.39   0.025     .0090033    .1210689
          c10 |   .5680027    .107173     5.30   0.000     .3472758    .7887296
          c11 |   .0483502   .0014215    34.01   0.000     .0454225    .0512779
          c12 |    .047666    .005372     8.87   0.000     .0366021    .0587299
          c13 |  -.0914708   .0059223   -15.45   0.000    -.1036679   -.0792736
          c14 |  -.0103124   .0492482    -0.21   0.836    -.1117409     .091116
          c15 |  -.1892021   .0053135   -35.61   0.000    -.2001455   -.1782588
          c16 |  -.0559568    .030969    -1.81   0.083    -.1197386    .0078251
          c17 |   .1932147   .0262246     7.37   0.000     .1392041    .2472252
          c18 |  -.2302756   .1193467    -1.93   0.065    -.4760747    .0155235
          c19 |   .0368843   .0063736     5.79   0.000     .0237576    .0500109
          c20 |   -.072451   .1187986    -0.61   0.547    -.3171213    .1722193
          c21 |  -.0259148   .0404594    -0.64   0.528    -.1092424    .0574128
          c22 |   .0241896   .0745712     0.32   0.748    -.1293927    .1777719
          c23 |   .3125447   .0653268     4.78   0.000     .1780018    .4470877
          c24 |    .581717   .1054428     5.52   0.000     .3645535    .7988806
          c25 |    .072269   .0300077     2.41   0.024     .0104669    .1340711
         year |  -.0090972   .0022904    -3.97   0.001    -.0138145     -.00438
  ln_eccd_alt |   .2025437   .0504555     4.01   0.000     .0986287    .3064586
ln_eccd_2_alt |   .0864493   .0198472     4.36   0.000     .0455732    .1273253
        _cons |   6.567627    4.58075     1.43   0.164    -2.866605    16.00186
-------------------------------------------------------------------------------

. 
. nlcom   (a: _b[_cons]) ///
>                 (d: _b[year]) ///
>                 (omega: _b[ln_eccd_alt]) ///
>                 (psi: ((_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])/(_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])-_b[ln_eccd_2_alt]))-1)/(_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])/(_b
> [ln_eccd_alt]*(1-_b[ln_eccd_alt])-_b[ln_eccd_2_alt]))) ///
>                 

           a:  _b[_cons]
           d:  _b[year]
       omega:  _b[ln_eccd_alt]
         psi:  ((_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])/(_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])-_b[ln_eccd_2_alt]))-1)/(_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])/(_b[ln_eccd_
> alt]*(1-_b[ln_eccd_alt])-_b[ln_eccd_2_alt]))

------------------------------------------------------------------------------
ln_egecd_alt |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           a |   6.567627    4.58075     1.43   0.164    -2.866605    16.00186
           d |  -.0090972   .0022904    -3.97   0.001    -.0138145     -.00438
       omega |   .2025437   .0504555     4.01   0.000     .0986287    .3064586
         psi |   .5352242   .1951469     2.74   0.011     .1333116    .9371368
------------------------------------------------------------------------------

. testnl  (((_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])/(_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])-_b[ln_eccd_2_alt]))-1)/(_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])/(_b[ln_eccd_alt]
> *(1-_b[ln_eccd_alt])-_b[ln_eccd_2_alt])) = 0)

  (1)  ((_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])/(_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])-_b[ln_eccd_2_alt]))-1)/(_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])/(_b[ln_eccd_alt]*(1-
> _b[ln_eccd_alt])-_b[ln_eccd_2_alt])) = 0

              F(1, 25) =        7.52
              Prob > F =        0.0111

. dis "sigma: " _b[ln_eccd_alt]*(1-_b[ln_eccd_alt])/(_b[ln_eccd_alt]*(1-_b[ln_eccd_alt])-_b[ln_eccd_2_alt])
sigma: 2.1515751

. dis e(r2_a)
.96510926

. 
. 
. 
. 
. 
. ***
. * Column 4: Linear Estimation of Kmenta Approximation in First Differences - Electricity Sector - Alternative Capital Proxy
. *** 
. 
. macro drop _*

. 
. * Generate additional variables
. xtset id year
       panel variable:  id (strongly balanced)
        time variable:  year, 1995 to 2007
                delta:  1 unit

. gen dln_egecd_alt = D.ln_egecd_alt
(26 missing values generated)

. gen dln_eccd_alt = D.ln_eccd_alt 
(26 missing values generated)

. gen dln_eccd_2_alt = D.ln_eccd_2_alt
(26 missing values generated)

. xtset id
       panel variable:  id (balanced)

. 
. 
. * FD-OLS
. reg dln_egecd_alt dln_eccd_alt dln_eccd_2_alt, vce(cluster country)

Linear regression                                      Number of obs =     312
                                                       F(  2,    25) =  209.84
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.5575
                                                       Root MSE      =    .072

                                 (Std. Err. adjusted for 26 clusters in country)
--------------------------------------------------------------------------------
               |               Robust
 dln_egecd_alt |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------+----------------------------------------------------------------
  dln_eccd_alt |   .4012334   .0627797     6.39   0.000     .2719361    .5305307
dln_eccd_2_alt |   .1059184   .0158792     6.67   0.000     .0732144    .1386223
         _cons |  -.0089909   .0026804    -3.35   0.003    -.0145114   -.0034704
--------------------------------------------------------------------------------

. 
. nlcom   (d: _b[_cons]) ///
>                 (omega: _b[dln_eccd_alt]) ///
>                 (psi:  ((_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])/(_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])-_b[dln_eccd_2_alt])) - 1) / (_b[dln_eccd_alt]*(1-_b[dln_ec
> cd_alt])/(_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])-_b[dln_eccd_2_alt])))

           d:  _b[_cons]
       omega:  _b[dln_eccd_alt]
         psi:  ((_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])/(_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])-_b[dln_eccd_2_alt])) - 1) / (_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])/(
> _b[dln_eccd_alt]*(1-_b[dln_eccd_alt])-_b[dln_eccd_2_alt]))

------------------------------------------------------------------------------
dln_egecd_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           d |  -.0089909   .0026804    -3.35   0.003    -.0145114   -.0034704
       omega |   .4012334   .0627797     6.39   0.000     .2719361    .5305307
         psi |   .4408761   .0853431     5.17   0.000     .2651088    .6166434
------------------------------------------------------------------------------

. 
. testnl  (((_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])/(_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])-_b[dln_eccd_2_alt])) - 1) / (_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])/(_b[d
> ln_eccd_alt]*(1-_b[dln_eccd_alt])-_b[dln_eccd_2_alt])) = 0)

  (1)  ((_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])/(_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])-_b[dln_eccd_2_alt])) - 1) / (_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])/(_b[dln_e
> ccd_alt]*(1-_b[dln_eccd_alt])-_b[dln_eccd_2_alt])) = 0

              F(1, 25) =       26.69
              Prob > F =        0.0000

. dis "sigma: " _b[dln_eccd_alt]*(1-_b[dln_eccd_alt])/(_b[dln_eccd_alt]*(1-_b[dln_eccd_alt])-_b[dln_eccd_2_alt]) 
sigma: 1.7885124

. dis e(r2_a)
.55468446

. 
. 
. 
. 
. 
. 
. 
. 
. **********************************************************************************
. *                                                                                *
. *   Table 5 - Nonlinear Estimation of Cobb-Douglas in CES - Electricity Sector   *      
. *                                                                                *
. **********************************************************************************
. 
. qui{

. 
. 
. 
. ***
. * Column 1: Nonlinear Estimation of Cobb-Douglas in CES - Electricity Sector - Main Capital Proxy
. *** 
. 
. macro drop _*

. 
. * NLS-Estimation
. #delimit ;
delimiter now ;
. capture noisily nl (
> ln_eg = {a} + {d} * year +
> ${COUNTRY}
> + 1 / ({psi}) * ln(
> {omega} * (EC_c)^({psi})
> +
> (1-{omega}) * (EC_d^{alpha}*FU_d^(1-{alpha}))^(({psi})))
> ),
> iterate(100) initial( a 0 d 0.01 omega 0.5 alpha 0.7 psi -0.2) vce(cluster country);
(obs = 390)

Iteration 0:  residual SS =  46.44467
Iteration 1:  residual SS =  1.240978
Iteration 2:  residual SS =  1.234501
Iteration 3:  residual SS =  1.233978
Iteration 4:  residual SS =  1.233977
Iteration 5:  residual SS =  1.233977
Iteration 6:  residual SS =  1.233977
Iteration 7:  residual SS =  1.233977
Iteration 8:  residual SS =  1.233977
Iteration 9:  residual SS =  1.233977
Iteration 10:  residual SS =  1.233977

Nonlinear regression                                 Number of obs =       390
                                                     R-squared     =    0.9986
                                                     Adj R-squared =    0.9986
                                                     Root MSE      =  .0565405
                                                     Res. dev.     = -1138.031

                               (Std. Err. adjusted for 26 clusters in country)
------------------------------------------------------------------------------
             |               Robust
       ln_eg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /a |  -4.405003    3.44527    -1.28   0.213    -11.50067    2.690662
          /d |   .0025101   .0017096     1.47   0.155    -.0010108     .006031
       /b_c1 |   -.164432   .0240891    -6.83   0.000    -.2140444   -.1148196
       /b_c2 |   .2088883   .0939786     2.22   0.036     .0153356    .4024409
       /b_c3 |   .3968921    .056094     7.08   0.000     .2813645    .5124198
       /b_c4 |   .5851984   .0932692     6.27   0.000     .3931069      .77729
       /b_c5 |  -.1446878   .0202893    -7.13   0.000    -.1864743   -.1029013
       /b_c6 |   .0519991   .0242584     2.14   0.042     .0020379    .1019603
       /b_c7 |  -.2198471   .0165108   -13.32   0.000    -.2538517   -.1858425
       /b_c8 |   .0871228   .0611159     1.43   0.166    -.0387477    .2129933
       /b_c9 |   .2322652   .0402135     5.78   0.000      .149444    .3150863
      /b_c10 |   .8842886   .1269275     6.97   0.000     .6228764    1.145701
      /b_c11 |   .0619652   .0031543    19.64   0.000     .0554689    .0684616
      /b_c12 |  -.1264807   .0179206    -7.06   0.000     -.163389   -.0895725
      /b_c13 |   -.085691   .0037468   -22.87   0.000    -.0934077   -.0779742
      /b_c14 |  -.0730436   .0268305    -2.72   0.012     -.128302   -.0177852
      /b_c15 |  -.1395535   .0193017    -7.23   0.000    -.1793062   -.0998008
      /b_c16 |   .0614868   .0375793     1.64   0.114    -.0159091    .1388827
      /b_c17 |   .1644771    .017371     9.47   0.000     .1287009    .2002533
      /b_c18 |  -.2518806   .1150985    -2.19   0.038    -.4889303   -.0148309
      /b_c19 |  -.0426457   .0095448    -4.47   0.000    -.0623036   -.0229877
      /b_c20 |  -.0024036    .064135    -0.04   0.970    -.1344922    .1296849
      /b_c21 |  -.0361949   .0496753    -0.73   0.473     -.138503    .0661132
      /b_c22 |   .0297398   .0731017     0.41   0.688     -.120816    .1802955
      /b_c23 |    .286569   .0621473     4.61   0.000     .1585741    .4145638
      /b_c24 |   1.037214    .146669     7.07   0.000      .735143    1.339284
      /b_c25 |   .0109817   .0311369     0.35   0.727    -.0531459    .0751093
        /psi |   .5076549   .1173543     4.33   0.000     .2659591    .7493507
      /omega |   .4874782   .0482479    10.10   0.000     .3881098    .5868467
      /alpha |   .4374221   .0653598     6.69   0.000     .3028112    .5720331
------------------------------------------------------------------------------
  Parameter a taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. local a = _b[/a]

. local d = _b[/d]

. local psi = _b[/psi]

. local omega = _b[/omega]

. local alpha = _b[/alpha]

. 
. * Bootstrapping
. #delimit ;
delimiter now ;
. capture noisily nl (
> ln_eg = {a} + {d} * year +
> ${COUNTRY2}
> + 1 / ({psi}) * ln(
> {omega} * (EC_c)^({psi})
> +
> (1-{omega}) * (EC_d^{alpha}*FU_d^(1-{alpha}))^(({psi})))
> ),
> iterate(100) initial( a `a' d `d' omega `omega' alpha `alpha' psi `psi') vce(bootstrap, cluster(country) reject(_b[/psi] > 1 | _se[/psi] == 0) idcluster(newid) 
> reps(400)  seed(123));
(running nl on estimation sample)

Bootstrap replications (400)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
........xxx.xx....x....x..x.........x...x....x....    50
.x...........xxx.xx.....x..x.....x.xxxx.x....xxx..   100
xx.xx..x.x.x...x.x..x.xxx.x..x....x.xxxx..x.....x.   150
.x..........xx.......xx..x.xxx..x.....x.......xxx.   200
.xxx.....x.........xx.x.x....xx..xxx....x.x.......   250
xx...........xxxx...x.....x.x........xx....x...xx.   300
x.xx.x.....xxxxx....xx.x...xx.x........x.xx.xx..x.   350
....x..x..x.......x....x..x.x.........x.x.x..x...x   400

Nonlinear regression                                 Number of obs =       390
                                                     R-squared     =    0.9986
                                                     Adj R-squared =    0.9985
                                                     Root MSE      =  .0585467
                                                     Res. dev.     = -1138.031

Bootstrap results
                                (Replications based on 26 clusters in country)
------------------------------------------------------------------------------
             |   Observed   Bootstrap                         Normal-based
       ln_eg |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /a |  -4.405003   3.434268    -1.28   0.200    -11.13604    2.326038
          /d |   .0025101   .0017103     1.47   0.142    -.0008421    .0058623
       /b_c1 |   -.164432   .3777547    -0.44   0.663    -.9048176    .5759535
       /b_c2 |   .2088883   .3725714     0.56   0.575    -.5213382    .9391147
       /b_c3 |   .3968921   .3559146     1.12   0.265    -.3006878    1.094472
       /b_c4 |   .5851984   .4090518     1.43   0.153    -.2165283    1.386925
       /b_c5 |  -.1446878   .4118878    -0.35   0.725     -.951973    .6625975
       /b_c6 |   .0519991   .4027499     0.13   0.897    -.7373762    .8413745
       /b_c7 |  -.2198471   .4131421    -0.53   0.595    -1.029591    .5898966
       /b_c8 |   .0871228   .4355526     0.20   0.841    -.7665445    .9407902
       /b_c9 |   .2322651   .4505791     0.52   0.606    -.6508536    1.115384
      /b_c10 |   .8842886   .4504507     1.96   0.050     .0014214    1.767156
      /b_c11 |   .0619652   .4413096     0.14   0.888    -.8029857    .9269162
      /b_c12 |  -.1264807   .3704814    -0.34   0.733    -.8526109    .5996495
      /b_c13 |   -.085691   .3775073    -0.23   0.820    -.8255916    .6542097
      /b_c14 |  -.0730436   .3390548    -0.22   0.829    -.7375787    .5914915
      /b_c15 |  -.1395535   .3220063    -0.43   0.665    -.7706741    .4915672
      /b_c16 |   .0614868   .3184612     0.19   0.847    -.5626856    .6856592
      /b_c17 |   .1644771   .3182924     0.52   0.605    -.4593645    .7883187
      /b_c18 |  -.2518806   .3137207    -0.80   0.422    -.8667619    .3630007
      /b_c19 |  -.0426457   .3365786    -0.13   0.899    -.7023277    .6170363
      /b_c20 |  -.0024036   .3293257    -0.01   0.994    -.6478701    .6430629
      /b_c21 |  -.0361949   .3887026    -0.09   0.926     -.798038    .7256481
      /b_c22 |   .0297398   .5031148     0.06   0.953    -.9563472    1.015827
      /b_c23 |    .286569   .5341866     0.54   0.592    -.7604175    1.333555
      /b_c24 |   1.037214   .5455149     1.90   0.057     -.031976    2.106403
      /b_c25 |   .0109817   .4842505     0.02   0.982    -.9381318    .9600952
        /psi |   .5076549   .1538087     3.30   0.001     .2061953    .8091145
      /omega |   .4874782   .1008659     4.83   0.000     .2897847    .6851718
      /alpha |   .4374222   .0691099     6.33   0.000     .3019691    .5728752
------------------------------------------------------------------------------
  Parameter a taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. 
. * Testing both against the psi corresponding to sigma = 1 and sigma = infinity
. test _b[/psi] = 0

 ( 1)  [psi]_cons = 0

           chi2(  1) =   10.89
         Prob > chi2 =    0.0010

. test _b[/psi] = 1

 ( 1)  [psi]_cons = 1

           chi2(  1) =   10.25
         Prob > chi2 =    0.0014

. 
. * Computing sigma
. dis 1 / (1-_b[/psi])
2.0310957

. 
. * Testing nonlinearly for psi and sigma
. testnl _b[/psi] = 0

  (1)  _b[/psi] = 0

               chi2(1) =       10.89
           Prob > chi2 =        0.0010

. testnl 1/(1-_b[/psi]) = 1

  (1)  1/(1-_b[/psi]) = 1

               chi2(1) =        2.64
           Prob > chi2 =        0.1042

. 
. 
. 
. 
. ***
. * Column 2: Nonlinear Estimation of Cobb-Douglas in CES in FD - Electricity Sector - Main Capital Proxy
. *** 
. 
. macro drop _*

. 
. * FD-NLS-Estimation
. #delimit ;
delimiter now ;
. capture noisily nl (
> d1ln_eg = {d}  + 1 / ({psi}) * ln(
> ( {omega} * (EC_c)^({psi})
> +
> (1-{omega}) * (EC_d^{alpha}*FU_d^(1-{alpha}))^(({psi}))) 
> /
> ( {omega} * (l1EC_c)^({psi})
> +
> (1-{omega}) * (l1EC_d^{alpha}*l1FU_d^(1-{alpha}))^(({psi}))) )
> ) if year >= 1996 ,
> iterate(100)  initial( d 0.01 omega 0.5 alpha 0.5 psi -0.5) vce(cluster country);
(obs = 364)

Iteration 0:  residual SS =  .9814621
Iteration 1:  residual SS =  .9276974
Iteration 2:  residual SS =  .9030579
Iteration 3:  residual SS =  .9028173
Iteration 4:  residual SS =  .9027986
Iteration 5:  residual SS =  .9027954
Iteration 6:  residual SS =  .9027949
Iteration 7:  residual SS =  .9027948
Iteration 8:  residual SS =  .9027948
Iteration 9:  residual SS =  .9027948
Iteration 10:  residual SS =  .9027948
Iteration 11:  residual SS =  .9027948
Iteration 12:  residual SS =  .9027948
Iteration 13:  residual SS =  .9027948

Nonlinear regression                                 Number of obs =       364
                                                     R-squared     =    0.5289
                                                     Adj R-squared =    0.5100
                                                     Root MSE      =  .0500776
                                                     Res. dev.     = -1150.799

                               (Std. Err. adjusted for 26 clusters in country)
------------------------------------------------------------------------------
             |               Robust
     d1ln_eg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /d |   .0024887    .002032     1.22   0.232    -.0016964    .0066737
        /psi |   .6512053   .1778629     3.66   0.001     .2848897    1.017521
      /omega |   .7070534   .1333646     5.30   0.000     .4323839    .9817229
      /alpha |   .3790661   .1020914     3.71   0.001      .168805    .5893272
------------------------------------------------------------------------------
  Parameter d taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. local d = _b[/d]

. local psi = _b[/psi]

. local omega = _b[/omega]

. local alpha = _b[/alpha]

. 
. * Bootstrapping
. #delimit ;
delimiter now ;
. capture noisily nl (
> d1ln_eg = {d}  + 1 / ({psi}) * ln(
> ( {omega} * (EC_c)^({psi})
> +
> (1-{omega}) * (EC_d^{alpha}*FU_d^(1-{alpha}))^(({psi}))) 
> /
> ( {omega} * (l1EC_c)^({psi})
> +
> (1-{omega}) * (l1EC_d^{alpha}*l1FU_d^(1-{alpha}))^(({psi}))) )
> ) if year >= 1996 ,
> iterate(100)  initial( d `d' omega `omega' alpha `alpha' psi `psi') vce(bootstrap, cluster(country) reps(400) reject(_b[/psi] > 1 | _se[/psi] == 0) seed(123));
(running nl on estimation sample)

Bootstrap replications (400)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..x.x...xxx.xx....x....x..x.........x...x...xx....    50
.xx..........xxx.xx...x.x..x..x..x.xxxx.x....xxxx.   100
xx.xxx.xxx.x...x.x.xx.xxx.x.xx....x.xxxx..x.....x.   150
.x..........xxxx.....xx....xxx..x..x..x...x...xxx.   200
xxxx.....x.........xx.xxx....xx..xxx....x.xx.xx...   250
xx...........xxxx.x.xx..xxx.x..x.....xx....xxx.xxx   300
x.xx.x..xx.xxxxx.x..xx.x...xx.x.x..x...xxxx.xx..xx   350
....xx.x..xx.....xx.x..x..x.x.........x.x.x..x..xx   400

Nonlinear regression                                 Number of obs =       364
                                                     R-squared     =    0.5289
                                                     Adj R-squared =    0.5249
                                                     Root MSE      =  .0500776
                                                     Res. dev.     = -1150.799

Bootstrap results
                                (Replications based on 26 clusters in country)
------------------------------------------------------------------------------
             |   Observed   Bootstrap                         Normal-based
     d1ln_eg |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /d |   .0024886   .0018628     1.34   0.182    -.0011624    .0061396
        /psi |   .6512039   .1436983     4.53   0.000     .3695604    .9328473
      /omega |   .7070533   .0701518    10.08   0.000     .5695583    .8445483
      /alpha |   .3790657   .0940038     4.03   0.000     .1948217    .5633098
------------------------------------------------------------------------------
  Parameter d taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. 
. * Testing both against the psi corresponding to sigma = 1 and sigma = infinity
. test _b[/psi] = 0

 ( 1)  [psi]_cons = 0

           chi2(  1) =   20.54
         Prob > chi2 =    0.0000

. test _b[/psi] = 1

 ( 1)  [psi]_cons = 1

           chi2(  1) =    5.89
         Prob > chi2 =    0.0152

. 
. * Computing sigma
. dis 1 / (1-_b[/psi])
2.8670042

. 
. * Testing nonlinearly for psi and sigma
. testnl _b[/psi] = 0

  (1)  _b[/psi] = 0

               chi2(1) =       20.54
           Prob > chi2 =        0.0000

. testnl 1/(1-_b[/psi]) = 1

  (1)  1/(1-_b[/psi]) = 1

               chi2(1) =        2.50
           Prob > chi2 =        0.1140

. 
. 
. 
. 
. ***
. * Electricity Sector Data - Alternative Capital Proxy
. ***
. 
. qui{

. 
. 
. 
. ***
. * Column 3: Nonlinear Estimation of Cobb-Douglas in CES - Electricity Sector - Alternative Capital Proxy
. *** 
. 
. macro drop _*

. 
. * NLS-Estimation
. #delimit ;
delimiter now ;
. capture noisily nl (
> ln_eg = {a} + {d} * year +
> ${COUNTRY}
> + 1 / ({psi}) * ln(
> {omega} * (EC_c_alt)^({psi})
> +
> (1-{omega}) * (EC_d_alt^{alpha}*FU_d^(1-{alpha}))^(({psi})))
> ),
> iterate(100) initial( a 0 d 0.01 omega 0.5 alpha 0.7 psi -0.2) vce(cluster country);
(obs = 338)

Iteration 0:  residual SS =  577.4709
Iteration 1:  residual SS =  11.33132
Iteration 2:  residual SS =  7.319736
Iteration 3:  residual SS =  1.402427
Iteration 4:  residual SS =  1.088327
Iteration 5:  residual SS =  1.065254
Iteration 6:  residual SS =  1.065252
Iteration 7:  residual SS =  1.065252
Iteration 8:  residual SS =  1.065252
Iteration 9:  residual SS =  1.065252
Iteration 10:  residual SS =  1.065252
Iteration 11:  residual SS =  1.065252
Iteration 12:  residual SS =  1.065252

Nonlinear regression                                 Number of obs =       338
                                                     R-squared     =    0.9986
                                                     Adj R-squared =    0.9986
                                                     Root MSE      =  .0564746
                                                     Res. dev.     = -987.6216

                               (Std. Err. adjusted for 26 clusters in country)
------------------------------------------------------------------------------
             |               Robust
       ln_eg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /a |   -4.92655    4.19467    -1.17   0.251    -13.56563    3.712534
          /d |  -.0004017   .0021919    -0.18   0.856    -.0049159    .0041125
       /b_c1 |  -.1575081   .0295846    -5.32   0.000    -.2184387   -.0965774
       /b_c2 |   .2138209   .0943503     2.27   0.032     .0195028    .4081391
       /b_c3 |   .3527333   .0638717     5.52   0.000      .221187    .4842796
       /b_c4 |   .5585593   .0956744     5.84   0.000     .3615142    .7556044
       /b_c5 |  -.1861702   .0173215   -10.75   0.000    -.2218445   -.1504959
       /b_c6 |   .0371679   .0220708     1.68   0.105    -.0082877    .0826235
       /b_c7 |  -.1270523   .0354147    -3.59   0.001    -.1999903   -.0541143
       /b_c8 |   .1012406   .0599987     1.69   0.104    -.0223291    .2248103
       /b_c9 |   .2344647   .0420266     5.58   0.000     .1479093      .32102
      /b_c10 |   .8039549   .1448426     5.55   0.000      .505646    1.102264
      /b_c11 |   .0634988   .0014409    44.07   0.000     .0605313    .0664663
      /b_c12 |  -.1219063   .0166709    -7.31   0.000    -.1562406   -.0875719
      /b_c13 |  -.1273208   .0045046   -28.26   0.000    -.1365983   -.1180433
      /b_c14 |  -.0417271   .0419318    -1.00   0.329    -.1280873     .044633
      /b_c15 |   -.099524   .0137058    -7.26   0.000    -.1277516   -.0712965
      /b_c16 |   .0643856   .0411185     1.57   0.130    -.0202996    .1490707
      /b_c17 |   .1288292    .022109     5.83   0.000      .083295    .1743635
      /b_c18 |  -.2879969    .130353    -2.21   0.037    -.5564638   -.0195299
      /b_c19 |  -.0480287   .0077329    -6.21   0.000    -.0639548   -.0321026
      /b_c20 |   .0408159   .0765825     0.53   0.599    -.1169087    .1985404
      /b_c21 |  -.0066447    .042811    -0.16   0.878    -.0948156    .0815261
      /b_c22 |  -.0418481   .0766181    -0.55   0.590    -.1996461    .1159499
      /b_c23 |   .2340581   .0646023     3.62   0.001     .1010072     .367109
      /b_c24 |   1.001057   .1621801     6.17   0.000     .6670414    1.335074
      /b_c25 |   .0221852   .0269476     0.82   0.418    -.0333143    .0776848
        /psi |    .507926   .1149507     4.42   0.000     .2711806    .7446713
      /omega |   .0101475   .0102537     0.99   0.332    -.0109703    .0312654
      /alpha |   .3467219   .0595311     5.82   0.000     .2241154    .4693285
------------------------------------------------------------------------------
  Parameter a taken as constant term in model

. #delimit cr
delimiter now cr
. 
. local a = _b[/a]

. local d = _b[/d]

. local psi = _b[/psi]

. local omega = _b[/omega]

. local alpha = _b[/alpha]

. 
. * Bootstrapping
. #delimit ;
delimiter now ;
. capture noisily nl (
> ln_eg = {a} + {d} * year +
> ${COUNTRY2}
> + 1 / ({psi}) * ln(
> {omega} * (EC_c_alt)^({psi})
> +
> (1-{omega}) * (EC_d_alt^{alpha}*FU_d^(1-{alpha}))^(({psi})))
> ),
> iterate(100) initial( a `a' d `d' omega `omega' alpha `alpha' psi `psi') vce(bootstrap, cluster(country) idcluster(newid) reject(_b[/psi] > 1 | _se[/psi] == 0) 
> reps(400) seed(123));
(running nl on estimation sample)

Bootstrap replications (400)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
........xxx.xx....x....x..x.........x...x....x....    50
.x...........xxx.xx.....x..x.....x.xxxx.x....xxx..   100
xx.xx..xxx.x...x.x..x.xxx.x.xx....x.xxxx..x.....x.   150
.x..........xx.......xx....xxx..x.....x.......xxx.   200
.xxx.....x.........xx.x.x....xx..xxx....x.xx..x...   250
xx...........xxxx...xx....x.x........xx....xx..x..   300
x.xx.x.....xxxxx....xx.x...xx.x........x.xx.xx..x.   350
....x..x..xx.....xx....x..x.x.........x.x.x......x   400

Nonlinear regression                                 Number of obs =       338
                                                     R-squared     =    0.9986
                                                     Adj R-squared =    0.9985
                                                     Root MSE      =  .0588099
                                                     Res. dev.     = -987.6216

Bootstrap results
                                (Replications based on 26 clusters in country)
------------------------------------------------------------------------------
             |   Observed   Bootstrap                         Normal-based
       ln_eg |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /a |  -4.926554    4.12993    -1.19   0.233    -13.02107     3.16796
          /d |  -.0004017   .0021023    -0.19   0.848    -.0045222    .0037187
       /b_c1 |  -.1575081   .3677507    -0.43   0.668    -.8782863    .5632701
       /b_c2 |    .213821   .3672607     0.58   0.560    -.5059968    .9336387
       /b_c3 |   .3527333   .3464695     1.02   0.309    -.3263344    1.031801
       /b_c4 |   .5585593   .3944408     1.42   0.157    -.2145304    1.331649
       /b_c5 |  -.1861702   .3954557    -0.47   0.638    -.9612491    .5889087
       /b_c6 |   .0371679   .3873742     0.10   0.924    -.7220716    .7964074
       /b_c7 |  -.1270523   .3907955    -0.33   0.745    -.8929975    .6388929
       /b_c8 |   .1012406   .4111379     0.25   0.805    -.7045749    .9070561
       /b_c9 |   .2344647   .4310018     0.54   0.586    -.6102833    1.079213
      /b_c10 |   .8039549   .4291649     1.87   0.061    -.0371928    1.645103
      /b_c11 |   .0634988   .4142064     0.15   0.878    -.7483309    .8753284
      /b_c12 |  -.1219063   .3543637    -0.34   0.731    -.8164464    .5726338
      /b_c13 |  -.1273208   .3624745    -0.35   0.725    -.8377578    .5831161
      /b_c14 |  -.0417271    .322425    -0.13   0.897    -.6736685    .5902143
      /b_c15 |   -.099524   .3169446    -0.31   0.754     -.720724    .5216759
      /b_c16 |   .0643856   .3127196     0.21   0.837    -.5485335    .6773047
      /b_c17 |   .1288292   .3186073     0.40   0.686    -.4956297    .7532881
      /b_c18 |  -.2879969   .3151904    -0.91   0.361    -.9057587    .3297649
      /b_c19 |  -.0480287   .3396001    -0.14   0.888    -.7136327    .6175752
      /b_c20 |   .0408159   .3237813     0.13   0.900    -.5937838    .6754155
      /b_c21 |  -.0066447   .3799801    -0.02   0.986    -.7513921    .7381027
      /b_c22 |  -.0418481   .4937474    -0.08   0.932    -1.009575     .925879
      /b_c23 |   .2340581       .526     0.44   0.656     -.796883    1.264999
      /b_c24 |   1.001057   .5460734     1.83   0.067    -.0692268    2.071342
      /b_c25 |   .0221853   .4729767     0.05   0.963    -.9048321    .9492026
        /psi |    .507926   .1534189     3.31   0.001     .2072304    .8086216
      /omega |   .0101475   .0727182     0.14   0.889    -.1323776    .1526726
      /alpha |   .3467219    .060625     5.72   0.000     .2278991    .4655447
------------------------------------------------------------------------------
  Parameter a taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. 
. * Testing both against the psi corresponding to sigma = 1 and sigma = infinity
. test _b[/psi] = 0

 ( 1)  [psi]_cons = 0

           chi2(  1) =   10.96
         Prob > chi2 =    0.0009

. test _b[/psi] = 1

 ( 1)  [psi]_cons = 1

           chi2(  1) =   10.29
         Prob > chi2 =    0.0013

. 
. * Computing sigma
. dis 1 / (1-_b[/psi])
2.0322147

. 
. * Testing nonlinearly for psi and sigma
. testnl _b[/psi] = 0

  (1)  _b[/psi] = 0

               chi2(1) =       10.96
           Prob > chi2 =        0.0009

. testnl 1/(1-_b[/psi]) = 1

  (1)  1/(1-_b[/psi]) = 1

               chi2(1) =        2.65
           Prob > chi2 =        0.1033

. 
. 
. 
. 
. ***
. * Column 4: Nonlinear Estimation of Cobb-Douglas in CES in FD - Electricity Sector - Alternative Capital Proxy
. *** 
. 
. macro drop _*

. 
. * FD-NLS-Estimation
. #delimit ;
delimiter now ;
. capture noisily nl (
> d1ln_eg = {d}  + 1 / ({psi}) * ln(
> ( {omega} * (EC_c_alt)^({psi})
> +
> (1-{omega}) * (EC_d_alt^{alpha}*FU_d^(1-{alpha}))^(({psi}))) 
> /
> ( {omega} * (l1EC_c_alt)^({psi})
> +
> (1-{omega}) * (l1EC_d_alt^{alpha}*l1FU_d^(1-{alpha}))^(({psi}))) )
> ) if year >= 1996 ,
> iterate(100)  initial( d 0.01 omega 0.5 alpha 0.5 psi -0.5) vce(cluster country);
(obs = 312)

Iteration 0:  residual SS =   2.05933
Iteration 1:  residual SS =  1.933006
Iteration 2:  residual SS =  1.882446
Iteration 3:  residual SS =  1.657882
Iteration 4:  residual SS =  .9113895
Iteration 5:  residual SS =  .8459491
Iteration 6:  residual SS =  .8446855
Iteration 7:  residual SS =  .8445935
Iteration 8:  residual SS =  .8445801
Iteration 9:  residual SS =  .8445791
Iteration 10:  residual SS =  .8445789
Iteration 11:  residual SS =  .8445789
Iteration 12:  residual SS =  .8445789
Iteration 13:  residual SS =  .8445789
Iteration 14:  residual SS =  .8445789
Iteration 15:  residual SS =  .8445789
Iteration 16:  residual SS =  .8445789
Iteration 17:  residual SS =  .8445789
Iteration 18:  residual SS =  .8445789

Nonlinear regression                                 Number of obs =       312
                                                     R-squared     =    0.5044
                                                     Adj R-squared =    0.4845
                                                     Root MSE      =  .0523654
                                                     Res. dev.     = -959.1015

                               (Std. Err. adjusted for 26 clusters in country)
------------------------------------------------------------------------------
             |               Robust
     d1ln_eg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /d |  -.0001987   .0021868    -0.09   0.928    -.0047026    .0043052
        /psi |   .6440979   .1641601     3.92   0.001     .3060039    .9821918
      /omega |   .0047995   .0069881     0.69   0.499    -.0095928    .0191917
      /alpha |   .3107448    .097578     3.18   0.004     .1097792    .5117104
------------------------------------------------------------------------------
  Parameter d taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. local d = _b[/d]

. local psi = _b[/psi]

. local omega = _b[/omega]

. local alpha = _b[/alpha]

. 
. * Bootstrapping
. #delimit ;
delimiter now ;
. capture noisily nl (
> d1ln_eg = {d}  + 1 / ({psi}) * ln(
> ( {omega} * (EC_c_alt)^({psi})
> +
> (1-{omega}) * (EC_d_alt^{alpha}*FU_d^(1-{alpha}))^(({psi}))) 
> /
> ( {omega} * (l1EC_c_alt)^({psi})
> +
> (1-{omega}) * (l1EC_d_alt^{alpha}*l1FU_d^(1-{alpha}))^(({psi}))) )
> ) if year >= 1996 ,
> iterate(100)  initial( d `d' omega `omega' alpha `alpha' psi `psi') vce(bootstrap, cluster(country) reps(400) reject(_b[/psi] > 1 | _se[/psi] == 0) seed(123));
(running nl on estimation sample)

Bootstrap replications (400)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
...xx....xx.xx....x....x..x.........x...x...xx....    50
.xx..........xxx.xx...x.x..x..x..x.xxxx.x....xxxx.   100
xx.xx..xxx.x...x.x.xx.xxx.x.xx....x.xxxx..x.....x.   150
.x..........xxx......xx....xx...x.....x.......xxx.   200
xxxx.....x.........xx.x.x....xx..xxx....x.xx.xx...   250
xx...........xxxx.x.xx....x.x..x.....xx.....x..xx.   300
x.xx.x..xx.xxxxx.x..xx.x...xx.x.x..x...xxxx.xx..xx   350
....xx.x..xx.....xx.x..x..x.x.........x.x.x..x...x   400

Nonlinear regression                                 Number of obs =       312
                                                     R-squared     =    0.5044
                                                     Adj R-squared =    0.4995
                                                     Root MSE      =  .0523654
                                                     Res. dev.     = -959.1015

Bootstrap results
                                (Replications based on 26 clusters in country)
------------------------------------------------------------------------------
             |   Observed   Bootstrap                         Normal-based
     d1ln_eg |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /d |  -.0001987   .0020715    -0.10   0.924    -.0042588    .0038614
        /psi |   .6440981   .1333253     4.83   0.000     .3827854    .9054108
      /omega |   .0047995    .012926     0.37   0.710     -.020535    .0301339
      /alpha |   .3107449   .0864092     3.60   0.000     .1413859    .4801039
------------------------------------------------------------------------------
  Parameter d taken as constant term in model

. #delimit cr
delimiter now cr
. est store e_ces

. 
. * Testing both against the psi corresponding to sigma = 1 and sigma = infinity
. test _b[/psi] = 0

 ( 1)  [psi]_cons = 0

           chi2(  1) =   23.34
         Prob > chi2 =    0.0000

. test _b[/psi] = 1

 ( 1)  [psi]_cons = 1

           chi2(  1) =    7.13
         Prob > chi2 =    0.0076

. 
. * Computing sigma
. dis 1 / (1-_b[/psi])
2.8097632

. 
. * Testing nonlinearly for psi and sigma
. testnl _b[/psi] = 0

  (1)  _b[/psi] = 0

               chi2(1) =       23.34
           Prob > chi2 =        0.0000

. testnl 1/(1-_b[/psi]) = 1

  (1)  1/(1-_b[/psi]) = 1

               chi2(1) =        2.96
           Prob > chi2 =        0.0855

. 
. 
. 
. 
. **************************************************************************************************************
. *                                                                                                            *
. *   Table 6     - Nonlinear Estimation and Kmenta Approximation of CES in Cobb-Douglas - Non-Energy Industries   *      
. *                                                                                                            *
. **************************************************************************************************************
. 
. qui{

. 
. 
. 
. ***
. * Column 1: Nonlinear Estimation of CES in Cobb-Douglas - Non-Energy Industries - Value Added
. ***
. 
. macro drop _*

. 
. * NLS-Estimation
. #delimit ;
delimiter now ;
. capture noisily nl ( ln_vaxiie = {a} + {d}*year +(1-{alph}-{gamm})*ln_xl+{alph}*ln_xk
> ${CDCES}
> ${INDCES}
> +{gamm}*(1/{psi}*ln(xd^({psi})+xc^({psi}) )) ) , vce(cluster id) iterate(100)
> initial( a 0 d 0.01 alph 0.3 gamm 0.1 psi 0.2 );
(obs = 6914)

Iteration 0:  residual SS =  5434.053
Iteration 1:  residual SS =   2579.23
Iteration 2:  residual SS =  1207.188
Iteration 3:  residual SS =  1207.026
Iteration 4:  residual SS =  1207.005
Iteration 5:  residual SS =  1206.998
Iteration 6:  residual SS =  1206.996
Iteration 7:  residual SS =  1206.996
Iteration 8:  residual SS =  1206.995
Iteration 9:  residual SS =  1206.995
Iteration 10:  residual SS =  1206.995
Iteration 11:  residual SS =  1206.995
Iteration 12:  residual SS =  1206.995
Iteration 13:  residual SS =  1206.995
Iteration 14:  residual SS =  1206.995
Iteration 15:  residual SS =  1206.995
Iteration 16:  residual SS =  1206.995
Iteration 17:  residual SS =  1206.995
Iteration 18:  residual SS =  1206.995
Iteration 19:  residual SS =  1206.995
Iteration 20:  residual SS =  1206.995
Iteration 21:  residual SS =  1206.995
Iteration 22:  residual SS =  1206.995
Iteration 23:  residual SS =  1206.995
Iteration 24:  residual SS =  1206.995
Iteration 25:  residual SS =  1206.995
Iteration 26:  residual SS =  1206.995
Iteration 27:  residual SS =  1206.995
Iteration 28:  residual SS =  1206.995
Iteration 29:  residual SS =  1206.995

Nonlinear regression                                 Number of obs =      6914
                                                     R-squared     =    0.9480
                                                     Adj R-squared =    0.9479
                                                     Root MSE      =  .4193379
                                                     Res. dev.     =  7553.286

                                   (Std. Err. adjusted for 532 clusters in id)
------------------------------------------------------------------------------
             |               Robust
   ln_vaxiie |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /a |  -10.74111   4.468434    -2.40   0.017    -19.51908    -1.96313
          /d |   .0100504   .0020619     4.87   0.000     .0059999    .0141009
       /alph |   .3589428   .0460042     7.80   0.000     .2685702    .4493154
       /gamm |   .2597437   .0418858     6.20   0.000     .1774615    .3420259
       /b_c1 |  -.2020452   .1183757    -1.71   0.088    -.4345872    .0304969
       /b_c2 |  -.2601287   .1060231    -2.45   0.014     -.468405   -.0518525
       /b_c3 |  -.0301197   .1019576    -0.30   0.768    -.2304094    .1701701
       /b_c4 |  -.2287214   .1231494    -1.86   0.064    -.4706411    .0131984
       /b_c5 |  -.0247755   .0915172    -0.27   0.787    -.2045557    .1550048
       /b_c6 |  -.1052288    .105188    -1.00   0.318    -.3118644    .1014069
       /b_c7 |   -.113617   .0970321    -1.17   0.242    -.3042308    .0769969
       /b_c8 |  -.0874802   .1016359    -0.86   0.390     -.287138    .1121776
       /b_c9 |   .0175621   .0914915     0.19   0.848    -.1621677    .1972919
      /b_c10 |   .1202439   .1088223     1.10   0.270    -.0935311    .3340189
      /b_c11 |  -.1972271     .13442    -1.47   0.143    -.4612874    .0668332
      /b_c12 |   .0818856   .1231462     0.66   0.506     -.160028    .3237991
      /b_c13 |  -.1018157   .1087329    -0.94   0.350    -.3154151    .1117838
      /b_c14 |  -.4832635   .1315981    -3.67   0.000    -.7417802   -.2247467
      /b_c15 |   .0589028   .1127181     0.52   0.601    -.1625254    .2803309
      /b_c16 |   -.178018   .1363999    -1.31   0.192    -.4459676    .0899315
      /b_c17 |  -.1604009   .1101616    -1.46   0.146    -.3768069    .0560051
      /b_c18 |  -.0588637   .1227539    -0.48   0.632    -.3000066    .1822792
       /b_i1 |   -.148786   .1049393    -1.42   0.157     -.354933    .0573611
       /b_i2 |  -.6871511   .1005631    -6.83   0.000    -.8847014   -.4896008
       /b_i3 |  -.7017378   .1116533    -6.28   0.000    -.9210741   -.4824015
       /b_i4 |  -.3619979   .1414555    -2.56   0.011    -.6398789   -.0841169
       /b_i5 |   .3933191   .1894694     2.08   0.038     .0211176    .7655206
       /b_i6 |   .6854993   .1302336     5.26   0.000      .429663    .9413356
       /b_i7 |   .0605695   .1465966     0.41   0.680    -.2274109    .3485498
       /b_i8 |  -.2432056   .1171408    -2.08   0.038     -.473322   -.0130893
       /b_i9 |   .1988091   .1315454     1.51   0.131    -.0596041    .4572224
      /b_i10 |   .1625303   .1147238     1.42   0.157    -.0628378    .3878984
      /b_i11 |  -.7480423   .1663325    -4.50   0.000    -1.074793   -.4212918
      /b_i12 |   .0112028   .1340081     0.08   0.933    -.2520481    .2744538
      /b_i13 |   .2755975   .0883832     3.12   0.002     .1019738    .4492212
      /b_i14 |   .5053783   .1012762     4.99   0.000     .3064271    .7043296
      /b_i15 |   .0329015   .0985758     0.33   0.739    -.1607449    .2265479
      /b_i16 |  -.7444389   .1236705    -6.02   0.000    -.9873823   -.5014954
      /b_i17 |  -.4511222   .1364178    -3.31   0.001     -.719107   -.1831374
      /b_i18 |    .362419   .1410175     2.57   0.010     .0853984    .6394397
      /b_i19 |   .0739421   .1039376     0.71   0.477    -.1302372    .2781214
      /b_i20 |  -1.094896   .1317465    -8.31   0.000    -1.353704   -.8360873
      /b_i21 |  -.4774664   .1492148    -3.20   0.001    -.7705901   -.1843428
      /b_i22 |   .4653103   .1182777     3.93   0.000     .2329606    .6976601
      /b_i23 |  -.6409877     .10995    -5.83   0.000     -.856978   -.4249974
      /b_i24 |   1.126674    .097404    11.57   0.000     .9353294    1.318019
      /b_i25 |  -.1708222   .0965661    -1.77   0.077    -.3605206    .0188763
      /b_i26 |  -.1383552   .1164476    -1.19   0.235    -.3671097    .0903993
      /b_i27 |   .3232953    .091153     3.55   0.000     .1442305    .5023601
        /psi |   .6513062   .4033734     1.61   0.107    -.1410972     1.44371
------------------------------------------------------------------------------
  Parameter a taken as constant term in model

. #delimit cr
delimiter now cr
. 
. local a = _b[/a]

. local d = _b[/d]

. local psi = _b[/psi]

. local alph = _b[/alph]

. local gamm = _b[/gamm]

. 
. * Bootstrapping
. #delimit ;
delimiter now ;
. capture noisily nl ( ln_vaxiie = {a} + {d}*year +(1-{alph}-{gamm})*ln_xl+{alph}*ln_xk
> ${CDCES}
> ${INDCES}
> +{gamm}*(1/{psi}*ln(xd^({psi})+xc^({psi}) )) ) , vce(bootstrap, cluster(country industry) reps(400) reject(_b[/psi] >1 | _se[/psi] == 0)  seed(123)) iterate(100
> )
> initial( a `a' d `d' alph `alph' gamm `gamm' psi `psi' );
(running nl on estimation sample)

Bootstrap replications (400)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..x....x..x.x...x......x..............x......x...x    50
..xxx.x..........x...x.........x.x..x.............   100
..x.............x.......x..x..............x......x   150
..x....xx.........................................   200
..x.x..x.xx......x.x.......x......................   250
..x..x...........x............x......x........xx..   300
x....x.x.x.x........x...x..x........x...x..x......   350
..x....x.....x.x...........x....................x.   400

Nonlinear regression                                 Number of obs =      6914
                                                     R-squared     =    0.9480
                                                     Adj R-squared =    0.9476
                                                     Root MSE      =  .4193379
                                                     Res. dev.     =  7553.286

Bootstrap results
                      (Replications based on 532 clusters in country industry)
------------------------------------------------------------------------------
             |   Observed   Bootstrap                         Normal-based
   ln_vaxiie |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /a |  -10.74111   4.716425    -2.28   0.023    -19.98513   -1.497088
          /d |   .0100504   .0021622     4.65   0.000     .0058126    .0142883
       /alph |   .3589428   .0483272     7.43   0.000     .2642232    .4536624
       /gamm |   .2597437   .0417543     6.22   0.000     .1779068    .3415805
       /b_c1 |  -.2020453   .1241271    -1.63   0.104      -.44533    .0412394
       /b_c2 |  -.2601287    .116316    -2.24   0.025    -.4881038   -.0321535
       /b_c3 |  -.0301197   .1068973    -0.28   0.778    -.2396345    .1793951
       /b_c4 |  -.2287213   .1369222    -1.67   0.095    -.4970839    .0396413
       /b_c5 |  -.0247755   .0988913    -0.25   0.802    -.2185989     .169048
       /b_c6 |  -.1052288   .1162118    -0.91   0.365    -.3329998    .1225422
       /b_c7 |   -.113617   .1058255    -1.07   0.283    -.3210311    .0937971
       /b_c8 |  -.0874801   .1086928    -0.80   0.421    -.3005141    .1255539
       /b_c9 |   .0175621   .0991617     0.18   0.859    -.1767913    .2119155
      /b_c10 |   .1202439   .1161993     1.03   0.301    -.1075027    .3479904
      /b_c11 |  -.1972271   .1376012    -1.43   0.152    -.4669204    .0724662
      /b_c12 |   .0818855   .1304253     0.63   0.530    -.1737433    .3375143
      /b_c13 |  -.1018157   .1137344    -0.90   0.371     -.324731    .1210997
      /b_c14 |  -.4832635   .1335285    -3.62   0.000    -.7449745   -.2215525
      /b_c15 |   .0589028   .1208068     0.49   0.626    -.1778742    .2956797
      /b_c16 |   -.178018   .1380574    -1.29   0.197    -.4486056    .0925695
      /b_c17 |  -.1604009   .1185972    -1.35   0.176    -.3928472    .0720454
      /b_c18 |  -.0588636   .1257514    -0.47   0.640    -.3053317    .1876045
       /b_i1 |  -.1487859   .1146182    -1.30   0.194    -.3734335    .0758617
       /b_i2 |  -.6871511   .1047434    -6.56   0.000    -.8924443   -.4818579
       /b_i3 |  -.7017379   .1132561    -6.20   0.000    -.9237158   -.4797599
       /b_i4 |  -.3619978   .1380822    -2.62   0.009    -.6326339   -.0913617
       /b_i5 |   .3933193   .1981711     1.98   0.047     .0049111    .7817275
       /b_i6 |   .6854993   .1321929     5.19   0.000      .426406    .9445926
       /b_i7 |   .0605694   .1539165     0.39   0.694    -.2411014    .3622403
       /b_i8 |  -.2432055   .1194072    -2.04   0.042    -.4772393   -.0091718
       /b_i9 |   .1988091    .141391     1.41   0.160    -.0783121    .4759304
      /b_i10 |   .1625303   .1316186     1.23   0.217    -.0954374    .4204981
      /b_i11 |  -.7480423   .1720357    -4.35   0.000    -1.085226   -.4108585
      /b_i12 |   .0112028   .1408243     0.08   0.937    -.2648078    .2872134
      /b_i13 |   .2755974   .0915835     3.01   0.003     .0960972    .4550977
      /b_i14 |   .5053782   .0992565     5.09   0.000      .310839    .6999175
      /b_i15 |   .0329014   .1028432     0.32   0.749    -.1686675    .2344704
      /b_i16 |  -.7444394   .1164411    -6.39   0.000    -.9726597   -.5162191
      /b_i17 |  -.4511223   .1352384    -3.34   0.001    -.7161847     -.18606
      /b_i18 |   .3624189   .1379872     2.63   0.009      .091969    .6328689
      /b_i19 |    .073942   .1040214     0.71   0.477    -.1299361    .2778201
      /b_i20 |  -1.094896   .1338715    -8.18   0.000    -1.357279   -.8325125
      /b_i21 |  -.4774665   .1642784    -2.91   0.004    -.7994464   -.1554867
      /b_i22 |   .4653099   .1105754     4.21   0.000      .248586    .6820337
      /b_i23 |  -.6409877   .1131098    -5.67   0.000    -.8626789   -.4192966
      /b_i24 |   1.126674   .1025447    10.99   0.000       .92569    1.327658
      /b_i25 |  -.1708223   .1000386    -1.71   0.088    -.3668944    .0252498
      /b_i26 |  -.1383553   .1186975    -1.17   0.244     -.370998    .0942875
      /b_i27 |   .3232952   .0975158     3.32   0.001     .1321677    .5144227
        /psi |   .6513101   .1982411     3.29   0.001     .2627646    1.039856
------------------------------------------------------------------------------
  Parameter a taken as constant term in model

. #delimit cr
delimiter now cr
. est store ces

. 
. test _b[/psi] = 0

 ( 1)  [psi]_cons = 0

           chi2(  1) =   10.79
         Prob > chi2 =    0.0010

. dis "sigma: " 1/(1-_b[/psi]) 
sigma: 2.8678775

. 
. 
. 
. 
. ***
. * Column 2: Nonlinear Estimation of CES in Cobb-Douglas - Non-Energy Industries - Gross Output
. ***
. 
. macro drop _*

. 
. * NLS-Estimation
. #delimit ;
delimiter now ;
. capture noisily nl ( ln_go = {a} + {d}*year +(1-{alph}-{gamm}-{theta})*ln_xl+{alph}*ln_xk+{theta}*ln_xiims
> ${CDCES}
> ${INDCES}
> +{gamm}*(1/({psi})*ln(xd^({psi})+xc^({psi}) )) ), vce(cluster id) iterate(100)
> initial( a 0 d 0.01 alph 0.3 gamm 0.1 theta 0.1 psi -0.2 );
(obs = 6914)

Iteration 0:  residual SS =  28252.27
Iteration 1:  residual SS =  352.2211
Iteration 2:  residual SS =  352.2207
Iteration 3:  residual SS =  352.2207
Iteration 4:  residual SS =  352.2207
Iteration 5:  residual SS =  352.2207
Iteration 6:  residual SS =  352.2207
Iteration 7:  residual SS =  352.2207
Iteration 8:  residual SS =  352.2207
Iteration 9:  residual SS =  352.2207
Iteration 10:  residual SS =  352.2207
Iteration 11:  residual SS =  352.2207

Nonlinear regression                                 Number of obs =      6914
                                                     R-squared     =    0.9821
                                                     Adj R-squared =    0.9821
                                                     Root MSE      =  .2265429
                                                     Res. dev.     = -962.2118

                                   (Std. Err. adjusted for 532 clusters in id)
------------------------------------------------------------------------------
             |               Robust
       ln_go |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /a |   .1525232   2.729541     0.06   0.955    -5.209501    5.514548
          /d |    .002535   .0013241     1.91   0.056    -.0000661     .005136
       /alph |   .1860614   .0261657     7.11   0.000     .1346605    .2374624
       /gamm |   .1207873   .0244803     4.93   0.000     .0726973    .1688774
      /theta |   .5646876   .0337852    16.71   0.000     .4983186    .6310566
       /b_c1 |  -.1106355    .069763    -1.59   0.113    -.2476808    .0264097
       /b_c2 |  -.1527213   .0633225    -2.41   0.016    -.2771146   -.0283279
       /b_c3 |  -.0714536   .0615172    -1.16   0.246    -.1923006    .0493934
       /b_c4 |  -.0634344   .0744551    -0.85   0.395    -.2096971    .0828282
       /b_c5 |  -.0331692   .0572865    -0.58   0.563    -.1457053    .0793668
       /b_c6 |  -.0757534   .0606835    -1.25   0.212    -.1949626    .0434559
       /b_c7 |  -.0434806   .0580835    -0.75   0.454    -.1575823    .0706211
       /b_c8 |  -.0791485   .0592614    -1.34   0.182    -.1955641    .0372671
       /b_c9 |  -.0108837   .0557955    -0.20   0.845    -.1204907    .0987234
      /b_c10 |   .0076894   .0638736     0.12   0.904    -.1177865    .1331654
      /b_c11 |  -.0304489   .0814982    -0.37   0.709    -.1905474    .1296496
      /b_c12 |   .0216374   .0666995     0.32   0.746    -.1093899    .1526646
      /b_c13 |  -.0946869   .0629578    -1.50   0.133    -.2183638    .0289901
      /b_c14 |  -.2242177   .0794637    -2.82   0.005    -.3803195   -.0681159
      /b_c15 |   .0183779      .0704     0.26   0.794    -.1199188    .1566746
      /b_c16 |  -.0443689   .0766645    -0.58   0.563    -.1949719    .1062342
      /b_c17 |  -.0628977   .0661571    -0.95   0.342    -.1928594    .0670641
      /b_c18 |  -.0583055   .0711279    -0.82   0.413    -.1980322    .0814212
       /b_i1 |   -.109917    .064737    -1.70   0.090     -.237089     .017255
       /b_i2 |   -.360651   .0580472    -6.21   0.000    -.4746814   -.2466206
       /b_i3 |  -.3406586   .0616381    -5.53   0.000    -.4617429   -.2195742
       /b_i4 |   -.258294   .0765018    -3.38   0.001    -.4085774   -.1080107
       /b_i5 |   .0888412   .0988061     0.90   0.369    -.1052577    .2829401
       /b_i6 |   .2219634   .0676135     3.28   0.001     .0891407    .3547861
       /b_i7 |  -.0027695   .0812533    -0.03   0.973    -.1623869    .1568479
       /b_i8 |  -.1803927   .0677265    -2.66   0.008    -.3134374   -.0473481
       /b_i9 |   .0429215   .0701865     0.61   0.541    -.0949558    .1807988
      /b_i10 |    .033518   .0707662     0.47   0.636    -.1054981    .1725341
      /b_i11 |   -.268102   .0882538    -3.04   0.002    -.4414714   -.0947326
      /b_i12 |  -.0160799   .0691874    -0.23   0.816    -.1519945    .1198348
      /b_i13 |    .127082    .056508     2.25   0.025     .0160754    .2380886
      /b_i14 |   .2382935   .0655754     3.63   0.000     .1094745    .3671125
      /b_i15 |   .0747978   .0603942     1.24   0.216    -.0438431    .1934387
      /b_i16 |   -.400975    .082914    -4.84   0.000    -.5638546   -.2380953
      /b_i17 |  -.3044524   .0831689    -3.66   0.000    -.4678328    -.141072
      /b_i18 |   .1407834   .0918315     1.53   0.126    -.0396142     .321181
      /b_i19 |  -.0610021   .0609539    -1.00   0.317    -.1807425    .0587382
      /b_i20 |  -.6103316   .0772406    -7.90   0.000    -.7620663   -.4585969
      /b_i21 |  -.3393465   .0865399    -3.92   0.000    -.5093491   -.1693438
      /b_i22 |   .1929138   .0719933     2.68   0.008     .0514871    .3343405
      /b_i23 |  -.3454997   .0577827    -5.98   0.000    -.4590105   -.2319889
      /b_i24 |   .5662355    .064656     8.76   0.000     .4392226    .6932484
      /b_i25 |  -.0027189   .0587422    -0.05   0.963    -.1181144    .1126766
      /b_i26 |   .1283938   .0876519     1.46   0.144    -.0437933    .3005809
      /b_i27 |   .2509073   .0586186     4.28   0.000     .1357545    .3660602
        /psi |   .6537339   .5488703     1.19   0.234    -.4244898    1.731958
------------------------------------------------------------------------------
  Parameter a taken as constant term in model

. #delimit cr
delimiter now cr
. 
. local a = _b[/a]

. local d = _b[/d]

. local psi = _b[/psi]

. local alph = _b[/alph]

. local gamm = _b[/gamm]

. local theta = _b[/theta]

. 
. * Bootstrapping
. #delimit ;
delimiter now ;
. capture noisily nl ( ln_go = {a} + {d}*year +(1-{alph}-{gamm}-{theta})*ln_xl+{alph}*ln_xk+{theta}*ln_xiims
> ${CDCES}
> ${INDCES}
> +{gamm}*(1/({psi})*ln(xd^({psi})+xc^({psi}) )) ), vce(bootstrap, cluster(country industry) reject(_b[/psi] >1 | _se[/psi] == 0) reps(400)  seed(123)) iterate(10
> 0)
> initial( a `a' d `d' alph `alph' gamm `gamm' theta `theta' psi `psi' );
(running nl on estimation sample)

Bootstrap replications (400)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..x..x.x..x.x.x.......xxx.............x......x.x.x    50
..xxx.xx..xx.....x...x.........x.x..x..x.......x..   100
.xx...x.........x.....x.x.................xx.xx.xx   150
..x....x.x..........x.x.xx.......x...x............   200
xx..x....xx..xx...x....x...x..x.x.......x...x.x...   250
..x..x.......x...x...x...x...........x......x.xx..   300
.x.x.x.xxx.xx......x....x..x.....xx.x...x..x......   350
..x..x..xx...xxx..xxx....x.x.....x....xx........x.   400

Nonlinear regression                                 Number of obs =      6914
                                                     R-squared     =    0.9821
                                                     Adj R-squared =    0.9820
                                                     Root MSE      =  .2265429
                                                     Res. dev.     = -962.2118

Bootstrap results
                      (Replications based on 532 clusters in country industry)
------------------------------------------------------------------------------
             |   Observed   Bootstrap                         Normal-based
       ln_go |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          /a |    .152541   2.932274     0.05   0.959    -5.594611    5.899693
          /d |    .002535   .0013946     1.82   0.069    -.0001983    .0052683
       /alph |   .1860615   .0280449     6.63   0.000     .1310945    .2410284
       /gamm |   .1207873   .0239185     5.05   0.000     .0739079    .1676668
      /theta |   .5646876   .0365241    15.46   0.000     .4931017    .6362736
       /b_c1 |  -.1106355   .0725707    -1.52   0.127    -.2528715    .0316005
       /b_c2 |  -.1527213   .0696383    -2.19   0.028    -.2892098   -.0162327
       /b_c3 |  -.0714536   .0653725    -1.09   0.274    -.1995814    .0566742
       /b_c4 |  -.0634344   .0830089    -0.76   0.445    -.2261289      .09926
       /b_c5 |  -.0331692    .060861    -0.54   0.586    -.1524546    .0861162
       /b_c6 |  -.0757534   .0679387    -1.12   0.265    -.2089107     .057404
       /b_c7 |  -.0434806   .0637698    -0.68   0.495    -.1684671    .0815059
       /b_c8 |  -.0791485    .063637    -1.24   0.214    -.2038747    .0455778
       /b_c9 |  -.0108837   .0616422    -0.18   0.860    -.1317002    .1099329
      /b_c10 |   .0076894   .0700766     0.11   0.913    -.1296581     .145037
      /b_c11 |  -.0304489   .0855726    -0.36   0.722    -.1981681    .1372704
      /b_c12 |   .0216374   .0726955     0.30   0.766    -.1208432     .164118
      /b_c13 |  -.0946869   .0665225    -1.42   0.155    -.2250685    .0356948
      /b_c14 |  -.2242177    .080566    -2.78   0.005    -.3821242   -.0663111
      /b_c15 |   .0183779   .0761291     0.24   0.809    -.1308324    .1675882
      /b_c16 |  -.0443688   .0800317    -0.55   0.579    -.2012281    .1124904
      /b_c17 |  -.0628977   .0689015    -0.91   0.361    -.1979422    .0721469
      /b_c18 |  -.0583055   .0726739    -0.80   0.422    -.2007437    .0841326
       /b_i1 |   -.109917   .0693551    -1.58   0.113    -.2458506    .0260165
       /b_i2 |   -.360651   .0621283    -5.80   0.000    -.4824202   -.2388817
       /b_i3 |  -.3406585   .0647301    -5.26   0.000    -.4675272   -.2137899
       /b_i4 |   -.258294   .0746826    -3.46   0.001    -.4046692   -.1119189
       /b_i5 |   .0888412   .1010347     0.88   0.379    -.1091832    .2868656
       /b_i6 |   .2219634   .0729623     3.04   0.002     .0789599    .3649669
       /b_i7 |  -.0027695   .0828593    -0.03   0.973    -.1651708    .1596318
       /b_i8 |  -.1803927   .0673769    -2.68   0.007     -.312449   -.0483365
       /b_i9 |   .0429215   .0736577     0.58   0.560    -.1014448    .1872878
      /b_i10 |    .033518   .0838994     0.40   0.690    -.1309218    .1979578
      /b_i11 |   -.268102   .0944372    -2.84   0.005    -.4531955   -.0830085
      /b_i12 |  -.0160798    .073303    -0.22   0.826    -.1597511    .1275915
      /b_i13 |   .1270821   .0618197     2.06   0.040     .0059177    .2482464
      /b_i14 |   .2382935   .0657134     3.63   0.000     .1094976    .3670895
      /b_i15 |   .0747978   .0637876     1.17   0.241    -.0502236    .1998193
      /b_i16 |  -.4009749   .0787362    -5.09   0.000     -.555295   -.2466548
      /b_i17 |  -.3044524    .081037    -3.76   0.000    -.4632821   -.1456228
      /b_i18 |   .1407834   .0922842     1.53   0.127    -.0400902    .3216571
      /b_i19 |  -.0610021   .0634234    -0.96   0.336    -.1853097    .0633054
      /b_i20 |  -.6103316    .077252    -7.90   0.000    -.7617428   -.4589203
      /b_i21 |  -.3393465   .0935388    -3.63   0.000    -.5226791   -.1560138
      /b_i22 |   .1929138   .0732062     2.64   0.008     .0494323    .3363954
      /b_i23 |  -.3454997   .0598018    -5.78   0.000     -.462709   -.2282903
      /b_i24 |   .5662355   .0716475     7.90   0.000      .425809     .706662
      /b_i25 |  -.0027189   .0618706    -0.04   0.965     -.123983    .1185451
      /b_i26 |   .1283938   .0900063     1.43   0.154    -.0480153    .3048029
      /b_i27 |   .2509074   .0634957     3.95   0.000     .1264581    .3753566
        /psi |   .6537332   .2892873     2.26   0.024     .0867405    1.220726
------------------------------------------------------------------------------
  Parameter a taken as constant term in model

. #delimit cr
delimiter now cr
. est store ces

. 
. test _b[/psi] = 0

 ( 1)  [psi]_cons = 0

           chi2(  1) =    5.11
         Prob > chi2 =    0.0238

. dis "sigma: " 1/(1-_b[/psi])
sigma: 2.8879468

. 
. 
. 
. 
. ***
. * Column 3: Kmenta Approximation of CES in Cobb-Douglas - Non-Energy Industries - Value Added
. ***
. 
. macro drop _*

. 
. * Estimation
. cons def 2 ln_xcl=ln_xdl

. cnsreg ln_vaxiiel c1-c18 i1-i27 year ln_xkl ln_xdl ln_xcl ln_xdc_2, cons(2) vce(cluster id)

Constrained linear regression                     Number of obs   =       6914
                                                  F(  49,   6864) =      44.93
                                                  Prob > F        =     0.0000
                                                  Root MSE        =     0.4197

 ( 1)  - ln_xdl + ln_xcl = 0
                                   (Std. Err. adjusted for 532 clusters in id)
------------------------------------------------------------------------------
             |               Robust
  ln_vaxiiel |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          c1 |  -.2004246   .1189137    -1.69   0.092    -.4335322    .0326831
          c2 |  -.2688108   .1051556    -2.56   0.011    -.4749483   -.0626733
          c3 |  -.0285542   .1018333    -0.28   0.779     -.228179    .1710707
          c4 |  -.2348644   .1229064    -1.91   0.056    -.4757989    .0060701
          c5 |  -.0283219   .0915092    -0.31   0.757    -.2077082    .1510645
          c6 |  -.1091288   .1051227    -1.04   0.299    -.3152019    .0969442
          c7 |  -.1190496    .096591    -1.23   0.218    -.3083978    .0702986
          c8 |  -.0938169   .1011307    -0.93   0.354    -.2920644    .1044306
          c9 |   .0139065   .0914971     0.15   0.879    -.1654562    .1932692
         c10 |   .1195158   .1089894     1.10   0.273    -.0941373    .3331688
         c11 |  -.2002426   .1348431    -1.49   0.138    -.4645769    .0640916
         c12 |   .0751244   .1246169     0.60   0.547    -.1691632    .3194121
         c13 |  -.1061524   .1086223    -0.98   0.328    -.3190857    .1067809
         c14 |   -.484066   .1316442    -3.68   0.000    -.7421295   -.2260025
         c15 |    .059725   .1134353     0.53   0.599    -.1626434    .2820933
         c16 |  -.1820397    .136923    -1.33   0.184    -.4504513    .0863718
         c17 |  -.1647137   .1100832    -1.50   0.135    -.3805108    .0510834
         c18 |  -.0647834   .1221871    -0.53   0.596     -.304308    .1747411
          i1 |  -.1462565   .1050069    -1.39   0.164    -.3521025    .0595896
          i2 |  -.6846905   .1004119    -6.82   0.000    -.8815289   -.4878521
          i3 |  -.6989169   .1113208    -6.28   0.000      -.91714   -.4806937
          i4 |  -.3596286   .1412432    -2.55   0.011     -.636509   -.0827483
          i5 |   .3969691   .1899071     2.09   0.037     .0246924    .7692457
          i6 |   .6900063   .1299539     5.31   0.000     .4352564    .9447562
          i7 |   .0753853    .145474     0.52   0.604    -.2097888    .3605595
          i8 |  -.2363807   .1166121    -2.03   0.043    -.4649764    -.007785
          i9 |   .1981985   .1313357     1.51   0.131    -.0592601    .4556572
         i10 |   .1601685   .1148895     1.39   0.163    -.0650505    .3853876
         i11 |  -.7490345   .1663927    -4.50   0.000    -1.075216   -.4228533
         i12 |   .0186277   .1333227     0.14   0.889    -.2427261    .2799815
         i13 |   .2774898   .0886512     3.13   0.002      .103706    .4512735
         i14 |   .5108655   .1011533     5.05   0.000     .3125737    .7091573
         i15 |   .0344527   .0986525     0.35   0.727    -.1589367    .2278421
         i16 |  -.7194604   .1163534    -6.18   0.000     -.947549   -.4913718
         i17 |  -.4383185   .1341272    -3.27   0.001    -.7012494   -.1753876
         i18 |   .3675837   .1402489     2.62   0.009     .0926524    .6425151
         i19 |   .0778186   .1041649     0.75   0.455    -.1263768    .2820141
         i20 |  -1.075237    .130057    -8.27   0.000    -1.330189   -.8202854
         i21 |  -.4586939   .1494235    -3.07   0.002    -.7516102   -.1657776
         i22 |   .4940316   .1119585     4.41   0.000     .2745583    .7135049
         i23 |  -.6411904   .1098316    -5.84   0.000    -.8564943   -.4258866
         i24 |   1.127649   .0979839    11.51   0.000     .9355698    1.319727
         i25 |   -.170923    .096355    -1.77   0.076    -.3598088    .0179627
         i26 |  -.1375387   .1162944    -1.18   0.237    -.3655118    .0904344
         i27 |   .3268206   .0912758     3.58   0.000     .1478917    .5057495
        year |    .009891   .0020636     4.79   0.000     .0058457    .0139362
      ln_xkl |   .3603767   .0463068     7.78   0.000      .269601    .4511524
      ln_xdl |   .1290728   .0209853     6.15   0.000      .087935    .1702105
      ln_xcl |   .1290728   .0209853     6.15   0.000      .087935    .1702105
    ln_xdc_2 |   .0254473   .0092246     2.76   0.006     .0073643    .0435303
       _cons |  -10.13971   4.503375    -2.25   0.024    -18.96772   -1.311704
------------------------------------------------------------------------------

. 
. * Store estimates
. cap drop ln_vaxiiel_trans

. predict ln_vaxiiel_trans
(option xb assumed; fitted values)

. cap matrix drop _all

. cap scalar drop _all

. matrix b=e(b)

. 
. nlcom   (a: _b[_cons]) ///
>                 (d: _b[year]) ///
>                 (alpha: _b[ln_xkl]) ///
>                 (gamma: _b[ln_xdl]/0.5) ///
>                 (sigma: 1/(1-_b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25))) ///
>                 (psi: _b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25))

           a:  _b[_cons]
           d:  _b[year]
       alpha:  _b[ln_xkl]
       gamma:  _b[ln_xdl]/0.5
       sigma:  1/(1-_b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25))
         psi:  _b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25)

------------------------------------------------------------------------------
  ln_vaxiiel |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           a |  -10.13971   4.503375    -2.25   0.024    -18.96772   -1.311704
           d |    .009891   .0020636     4.79   0.000     .0058457    .0139362
       alpha |   .3603767   .0463068     7.78   0.000      .269601    .4511524
       gamma |   .2581455   .0419707     6.15   0.000       .17587     .340421
       sigma |   1.651007   .3624464     4.56   0.000     .9404997    2.361514
         psi |    .394309   .1329677     2.97   0.003     .1336512    .6549668
------------------------------------------------------------------------------

. 
. testnl  (1-(1-_b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25)) = 0)  

  (1)  1-(1-_b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25)) = 0

            F(1, 6864) =        8.79
              Prob > F =        0.0030

. testnl (1/(1-_b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25)) =1)

  (1)  1/(1-_b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25)) = 1

            F(1, 6864) =        3.23
              Prob > F =        0.0725

. 
. /*
> * alternative way of obtaining these results
> #delimit ;
> capture noisily nl ( ln_vaxiiel = {a} ${CDCES} ${INDCES} + {d}*year + {alpha}*ln_xkl + {gamma}*ln_xdl + {gamma}*ln_xcl + {jota}*ln_xdc_2), vce(cluster id) itera
> te(100);
> #delimit cr
> */
. 
. 
.                 
. ***
. * Column 4: Kmenta Approximation of CES in Cobb-Douglas - Non-Energy Industries - Gross Output
. ***
. 
. macro drop _*

. 
. * Estimation
. cons def 2 ln_xcl=ln_xdl

. cnsreg ln_gol c1-c18 i1-i27 year ln_xkl ln_xdl ln_xcl ln_xdc_2 ln_xiimsl, cons(2) vce(cluster id)

Constrained linear regression                     Number of obs   =       6914
                                                  F(  50,   6863) =     153.03
                                                  Prob > F        =     0.0000
                                                  Root MSE        =     0.2268

 ( 1)  - ln_xdl + ln_xcl = 0
                                   (Std. Err. adjusted for 532 clusters in id)
------------------------------------------------------------------------------
             |               Robust
      ln_gol |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          c1 |  -.1082368   .0703213    -1.54   0.124    -.2460883    .0296146
          c2 |  -.1589847     .06292    -2.53   0.012    -.2823275    -.035642
          c3 |   -.071533   .0616834    -1.16   0.246    -.1924516    .0493856
          c4 |  -.0670644   .0744641    -0.90   0.368     -.213037    .0789083
          c5 |  -.0362733   .0575949    -0.63   0.529     -.149177    .0766305
          c6 |  -.0784539   .0609173    -1.29   0.198    -.1978707    .0409629
          c7 |  -.0472748   .0579477    -0.82   0.415    -.1608702    .0663206
          c8 |  -.0845306   .0591247    -1.43   0.153    -.2004333    .0313721
          c9 |  -.0143897   .0559633    -0.26   0.797    -.1240951    .0953157
         c10 |   .0066452   .0641628     0.10   0.918    -.1191339    .1324242
         c11 |  -.0310842   .0820682    -0.38   0.705    -.1919634    .1297949
         c12 |   .0235123   .0669586     0.35   0.725    -.1077474    .1547719
         c13 |  -.0980599       .063    -1.56   0.120    -.2215593    .0254396
         c14 |    -.22327   .0793522    -2.81   0.005     -.378825   -.0677151
         c15 |   .0183754   .0712139     0.26   0.796    -.1212258    .1579767
         c16 |  -.0461216   .0771842    -0.60   0.550    -.1974265    .1051834
         c17 |  -.0653623   .0663202    -0.99   0.324    -.1953703    .0646457
         c18 |  -.0634107   .0711415    -0.89   0.373    -.2028701    .0760488
          i1 |  -.1113898   .0649131    -1.72   0.086    -.2386397      .01586
          i2 |  -.3606529   .0580137    -6.22   0.000    -.4743779    -.246928
          i3 |  -.3401533   .0615519    -5.53   0.000    -.4608141   -.2194924
          i4 |   -.259717   .0762393    -3.41   0.001    -.4091696   -.1102643
          i5 |   .0867379   .0989957     0.88   0.381    -.1073243    .2808001
          i6 |   .2229245   .0674617     3.30   0.001     .0906787    .3551702
          i7 |    .004679   .0798817     0.06   0.953    -.1519138    .1612718
          i8 |  -.1786937   .0673235    -2.65   0.008    -.3106686   -.0467187
          i9 |   .0406741   .0703613     0.58   0.563     -.097256    .1786041
         i10 |   .0295299   .0711011     0.42   0.678    -.1098503    .1689102
         i11 |  -.2718618    .088642    -3.07   0.002    -.4456276   -.0980959
         i12 |  -.0114697   .0688852    -0.17   0.868    -.1465061    .1235666
         i13 |   .1284536   .0569527     2.26   0.024     .0168087    .2400985
         i14 |   .2418331   .0656231     3.69   0.000     .1131916    .3704746
         i15 |   .0772357   .0606072     1.27   0.203    -.0415731    .1960446
         i16 |  -.3696467   .0797646    -4.63   0.000      -.52601   -.2132833
         i17 |  -.2964694   .0823747    -3.60   0.000    -.4579494   -.1349895
         i18 |   .1436192   .0916685     1.57   0.117    -.0360796    .3233179
         i19 |  -.0580806    .061419    -0.95   0.344    -.1784809    .0623197
         i20 |  -.5952536   .0756685    -7.87   0.000    -.7435874   -.4469199
         i21 |  -.3267132   .0866512    -3.77   0.000    -.4965764   -.1568501
         i22 |   .2165973   .0695829     3.11   0.002     .0801933    .3530013
         i23 |  -.3453191   .0578682    -5.97   0.000    -.4587587   -.2318795
         i24 |   .5663199   .0652877     8.67   0.000     .4383357     .694304
         i25 |  -.0015462   .0587714    -0.03   0.979    -.1167563    .1136639
         i26 |   .1314036    .087872     1.50   0.135    -.0408527      .30366
         i27 |   .2548425   .0588809     4.33   0.000     .1394176    .3702673
        year |   .0023312   .0013486     1.73   0.084    -.0003125    .0049749
      ln_xkl |    .186795    .026527     7.04   0.000     .1347938    .2387962
      ln_xdl |   .0602325    .012346     4.88   0.000     .0360307    .0844344
      ln_xcl |   .0602325    .012346     4.88   0.000     .0360307    .0844344
    ln_xdc_2 |   .0083253   .0064123     1.30   0.194    -.0042448    .0208954
   ln_xiimsl |   .5663861   .0342401    16.54   0.000     .4992648    .6335073
       _cons |   .6929653   2.794322     0.25   0.804    -4.784771    6.170702
------------------------------------------------------------------------------

. 
. * Store estimates
. cap drop ln_gol_trans

. predict ln_gol_trans
(option xb assumed; fitted values)

. cap matrix drop _all

. cap scalar drop _all

. matrix b=e(b)

. 
. nlcom   (a: _b[_cons]) ///
>                 (d: _b[year]) ///
>                 (alpha: _b[ln_xkl]) ///
>                 (gamma: _b[ln_xdl]/0.5) ///
>                 (theta: _b[ln_xiimsl]) ///
>                 (sigma: 1/(1-_b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25))) ///
>                 (psi: _b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25))

           a:  _b[_cons]
           d:  _b[year]
       alpha:  _b[ln_xkl]
       gamma:  _b[ln_xdl]/0.5
       theta:  _b[ln_xiimsl]
       sigma:  1/(1-_b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25))
         psi:  _b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25)

------------------------------------------------------------------------------
      ln_gol |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           a |   .6929653   2.794322     0.25   0.804    -4.784771    6.170702
           d |   .0023312   .0013486     1.73   0.084    -.0003125    .0049749
       alpha |    .186795    .026527     7.04   0.000     .1347938    .2387962
       gamma |   .1204651   .0246919     4.88   0.000     .0720613    .1688689
       theta |   .5663861   .0342401    16.54   0.000     .4992648    .6335073
       sigma |   1.382054    .375019     3.69   0.000     .6469007    2.117208
         psi |   .2764394   .1963375     1.41   0.159    -.1084429    .6613216
------------------------------------------------------------------------------

. 
. testnl  (1-(1-_b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25)) = 0)  

  (1)  1-(1-_b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25)) = 0

            F(1, 6863) =        1.98
              Prob > F =        0.1592

. testnl (1/(1-_b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25)) =1)

  (1)  1/(1-_b[ln_xdc_2]/(_b[ln_xdl]/0.5*0.25)) = 1

            F(1, 6863) =        1.04
              Prob > F =        0.3084

. 
. /*
> * alternative way of obtaining these results
> #delimit ;
> capture noisily nl ( ln_gol = {a} ${CDCES} ${INDCES} + {d}*year + {alpha}*ln_xkl + {gamma}*ln_xdl + {gamma}*ln_xcl + {jota}*ln_xdc_2 + {theta}*ln_xiimsl), vce(c
> luster id) iterate(100);
> #delimit cr 
> */
. 
. 
. 
. log close
      name:  <unnamed>
       log:  C:\Users\USER\Desktop\PapageorgiouSaamSchulte2015\estimation_results.log
  log type:  text
 closed on:  19 Oct 2015, 17:47:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------
